[erlang-bugs] Internal error in core_lib when using map as map key in pattern

Ulf Norell ulf.norell@REDACTED
Tue Mar 4 09:54:52 CET 2014


This is the last one for now :)

-module(bug).
f(#{#{} := _}) -> ok.

$ erl
Erlang/OTP 17 [RELEASE CANDIDATE 2] [erts-6.0] [source-a74e66a] [64-bit]
[smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.0  (abort with ^G)
1> c(bug).
bug.erl: internal error in core_module;
crash reason: function_clause

  in function  core_lib:literal_value/1
     called as
core_lib:literal_value({c_map,[2,{file,"bug.erl"}],{c_literal,[],[]},[]})
  in call from v3_core:'-pattern_map_pairs/2-anonymous-0-'/3 (v3_core.erl,
line 1497)
  in call from lists:mapfoldl/3 (lists.erl, line 1352)
  in call from v3_core:pattern_map_pairs/2 (v3_core.erl, line 1494)
  in call from v3_core:pattern/2 (v3_core.erl, line 1482)
  in call from v3_core:'-pattern_list/2-lc$^0/1-0-'/2 (v3_core.erl, line
1600)
  in call from v3_core:clause/2 (v3_core.erl, line 206)
  in call from v3_core:clauses/2 (v3_core.erl, line 197)
bug.erl:2: Warning: function f/1 is unused
error

/ Ulf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140304/0ee3fa01/attachment.htm>


More information about the erlang-bugs mailing list