<div dir="ltr"><div>-module(bug).</div><div>f(X) -> [a, X]#{a => x}.</div><div><br></div><div>$ erl</div><div>Erlang/OTP 17 [RELEASE CANDIDATE 2] [erts-6.0] [source-a74e66a] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]</div>
<div><br></div><div>Eshell V6.0 (abort with ^G)</div><div>1> c(bug).</div><div>Function: f/1</div><div>bug.erl: internal error in kernel_module;</div><div>crash reason: {badmatch,{{k_cons,[2,{file,"bug.erl"}],</div>
<div> {k_atom,[2,{file,"bug.erl"}],a},</div><div> {k_var,[],ker0}},</div><div> [{iset,[],</div><div> [{k_var,[],ker0}],</div><div> {k_cons,[2,{file,"bug.erl"}],</div>
<div> {k_var,[2,{file,"bug.erl"}],cor0},</div><div> {k_nil,[2,{file,"bug.erl"}]}},</div><div> undefined}],</div><div> {kern,{f,1},</div>
<div> {f,1},</div><div> 1,0,</div><div> {set,1,16,16,8,80,48,</div><div> {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},</div><div> {{[cor0],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},</div>
<div> [],[],[],0}}}</div><div><br></div><div> in function v3_kernel:expr/3 (v3_kernel.erl, line 276)</div><div> in call from v3_kernel:expr/3 (v3_kernel.erl, line 307)</div><div> in call from v3_kernel:function/2 (v3_kernel.erl, line 152)</div>
<div> in call from lists:mapfoldl/3 (lists.erl, line 1352)</div><div> in call from v3_kernel:module/2 (v3_kernel.erl, line 130)</div><div> in call from compile:kernel_module/1 (compile.erl, line 1191)</div><div> in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line 290)</div>
<div> in call from compile:fold_comp/3 (compile.erl, line 308)</div><div>bug.erl:2: Warning: function f/1 is unused</div><div>error</div><div><br></div><div>/ Ulf</div></div>