[erlang-bugs] Internal error in sys_core_fold when using repeated keys in map pattern

Ulf Norell ulf.norell@REDACTED
Tue Mar 4 14:20:36 CET 2014


-module(bug).
f(X) -> [[#{a := _, a := _}] = [X]].

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

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

  in function  sys_core_fold:expr/3
     called as
sys_core_fold:expr({c_alias,[],{c_var,[],cor4},{c_var,[],cor5}},
 value,
 {sub,[],{4,{cor0,{'X',nil,nil},{cor4,nil,{cor5,nil,nil}}}},[],false})
  in call from sys_core_fold:pair/3 (sys_core_fold.erl, line 437)
  in call from sys_core_fold:pair_list/3 (sys_core_fold.erl, line 431)
  in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 250)
  in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 231)
  in call from sys_core_fold:opt_simple_let/3 (sys_core_fold.erl, line 2549)
  in call from sys_core_fold:clause/4 (sys_core_fold.erl, line 1481)
  in call from sys_core_fold:clauses/5 (sys_core_fold.erl, line 1699)
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/d83faf88/attachment.htm>


More information about the erlang-bugs mailing list