[erlang-bugs] Internal error in v3_kernel when doing map update on non-map

Ulf Norell ulf.norell@REDACTED
Tue Mar 4 09:29:36 CET 2014


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

$ 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).
Function: f/1
bug.erl: internal error in kernel_module;
crash reason: {badmatch,{{k_cons,[2,{file,"bug.erl"}],
                   {k_atom,[2,{file,"bug.erl"}],a},
                   {k_var,[],ker0}},
           [{iset,[],
                  [{k_var,[],ker0}],
                  {k_cons,[2,{file,"bug.erl"}],
                          {k_var,[2,{file,"bug.erl"}],cor0},
                          {k_nil,[2,{file,"bug.erl"}]}},
                  undefined}],
           {kern,{f,1},
                 {f,1},
                 1,0,
                 {set,1,16,16,8,80,48,
                      {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},

{{[cor0],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},
                 [],[],[],0}}}

  in function  v3_kernel:expr/3 (v3_kernel.erl, line 276)
  in call from v3_kernel:expr/3 (v3_kernel.erl, line 307)
  in call from v3_kernel:function/2 (v3_kernel.erl, line 152)
  in call from lists:mapfoldl/3 (lists.erl, line 1352)
  in call from v3_kernel:module/2 (v3_kernel.erl, line 130)
  in call from compile:kernel_module/1 (compile.erl, line 1191)
  in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line
290)
  in call from compile:fold_comp/3 (compile.erl, line 308)
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/6be3521d/attachment.htm>


More information about the erlang-bugs mailing list