Elixir and Erlang/OTP versions
Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]
Elixir 1.16.0 (compiled with Erlang/OTP 26)
Operating system
Linux and macOS
Current behavior
iex(5)> quote do
...(5)> a = [do: c]
...(5)> end |> Macro.to_string |> IO.puts
a = :do => c
I noticed this while working on Spitfire. I piped the Spitfire produced AST into Macro.to_string, then pasted that into iex and saw this compile error, then reproduced using just quote/1
It seems to only reproduce when as an operand to the match operator, and when the key is specifically :do.
Expected behavior
iex(5)> quote do
...(5)> a = [do: c]
...(5)> end |> Macro.to_string |> IO.puts
a = [do: c]
Elixir and Erlang/OTP versions
Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]
Elixir 1.16.0 (compiled with Erlang/OTP 26)
Operating system
Linux and macOS
Current behavior
I noticed this while working on Spitfire. I piped the Spitfire produced AST into Macro.to_string, then pasted that into iex and saw this compile error, then reproduced using just
quote/1It seems to only reproduce when as an operand to the match operator, and when the key is specifically
:do.Expected behavior