Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Variable map key error #2083

yrashk opened this Issue Feb 28, 2014 · 2 comments


None yet
2 participants

yrashk commented Feb 28, 2014

iex(1)> a = 1
iex(2)> %{ a => 1 }
** (CaseClauseError) no case clause matching: nil
    (elixir) src/elixir_scope.erl:22: :elixir_scope.translate_var/4
    (elixir) src/elixir_translator.erl:329: :elixir_translator.translate_arg/3
    (elixir) src/elixir_map.erl:97: anonymous fn/8 in :elixir_map.translate_map/4
    (stdlib) lists.erl:1352: :lists.mapfoldl/3
    (elixir) src/elixir_map.erl:95: :elixir_map.translate_map/4
    (elixir) src/elixir.erl:151: :elixir.quoted_to_erl/3
    (elixir) src/elixir.erl:134: :elixir.eval_forms/4

I understand R17 doesn't support variable keys just yet, but can't we have a better exception?


josevalim commented Mar 1, 2014

We were supposed to have a better exception, i will investigate.


josevalim commented Mar 1, 2014

Oh, we were showing the nice exception only on match. I have fixed it. Thanks!

@josevalim josevalim closed this Mar 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment