You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Spark doesn't capture referenced bindings in generated functions.
To Reproduce
presetsdofor{name,message}<-[{:bend,"stuff"},{:start_casino,"with fun stuff"}]dopresetnamedodefault_message(message)contacter(fnmessage1->"#{message1}: #{unquote(message)}"end)endendend
error:
** (CompileError) test/dsl_test.exs:74: undefined function message/0 (there is no such import)
Expected behavior
Presence of referenced bindings in anonymous functions should generate different anonymous functions depending on the actual value of the binding.
Currently, there are limitations in Spark library and it is not possible
to write this code:
```elixir
for {field, value} <- [a: 1, b: 2, c: 3] do
param field, fn -> value end
end
```
details are here: ash-project/spark#50
fuelen
added a commit
to fuelen/seed_factory
that referenced
this issue
Jul 24, 2023
Currently, there are limitations in Spark library and it is not possible
to write this code:
```elixir
for {field, value} <- [a: 1, b: 2, c: 3] do
param field, fn -> value end
end
```
details are here: ash-project/spark#50
Describe the bug
Spark doesn't capture referenced bindings in generated functions.
To Reproduce
error:
Expected behavior
Presence of referenced bindings in anonymous functions should generate different anonymous functions depending on the actual value of the binding.
Runtime
Additional context
Link to conversation in Discord.
The text was updated successfully, but these errors were encountered: