-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Spark doesn't capture referenced bindings in generated functions.
To Reproduce
presets do
for {name, message} <- [{:bend, "stuff"}, {:start_casino, "with fun stuff"}] do
preset name do
default_message(message)
contacter(fn message1 ->
"#{message1}: #{unquote(message)}"
end)
end
end
end
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.
Runtime
- Spark version: latest
Additional context
Link to conversation in Discord.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working