<div dir="ltr"><div>-module(bug).</div><div>f() -> #{a => fun() -> ok end}#{a := false}.</div><div><br></div><div>I get a very similar error for this program:</div><div><br></div><div>-module(also_bug).</div><div>

f() -> fun() -> 0 end#{}.</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>bug.erl: internal error in core_module;</div><div>crash reason: function_clause</div><div><br></div><div>  in function  v3_core:expr/2</div><div>     called as v3_core:expr({'fun',2,{clauses,[{clause,2,[],[],[{atom,2,ok}]}]}},</div>

<div> {core,0,0,false,true,[report_errors,report_warnings],[],[{file,"bug.erl"}]})</div><div>  in call from v3_core:safe/2 (v3_core.erl, line 1407)</div><div>  in call from v3_core:'-map_pair_list/2-anonymous-0-'/2 (v3_core.erl, line 720)</div>

<div>  in call from v3_core:expr/2 (v3_core.erl, line 499)</div><div>  in call from v3_core:safe/2 (v3_core.erl, line 1407)</div><div>  in call from v3_core:expr/2 (v3_core.erl, line 503)</div><div>  in call from v3_core:exprs/2 (v3_core.erl, line 467)</div>

<div>  in call from v3_core:clause/2 (v3_core.erl, line 209)</div><div>bug.erl:2: Warning: function f/0 is unused</div><div>error</div><div><br></div><div>/ Ulf</div><div><br></div></div>