Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Variable map key error #2083

Closed
yrashk opened this Issue · 2 comments

2 participants

@yrashk
iex(1)> a = 1
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
Owner

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

@josevalim
Owner

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

@josevalim josevalim closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.