elixir
elixir copied to clipboard
Macro.escape doesn't handle HashDicts
The problem seems to be coming from the cons cells used by HashDict.
HashDict.new(a: 1, b: 2, c: 3) |> Macro.escape
Which results in:
** (FunctionClauseError) no function clause matching in :lists.reverse/1
lists.erl:145: :lists.reverse([:c | 3])
src/elixir_quote.erl:203: :elixir_quote.do_quote/3
src/elixir_quote.erl:263: :elixir_quote.do_splice/5
src/elixir_quote.erl:199: :elixir_quote.do_quote/3
/builddir/build/BUILD/elixir-0.10.0/lib/elixir/lib/macro.ex:76: Macro.escape/2
erl_eval.erl:569: :erl_eval.do_apply/6
src/elixir.erl:147: :elixir.eval_forms/3
/builddir/build/BUILD/elixir-0.10.0/lib/elixir/lib/code.ex:111: Code.do_eval_string/3
See elixir_quote.erl
I'll give this a go.