[erlang-questions] Why does Dialyzer crash on this map?

Ivan Uemlianin <>
Tue Nov 25 16:13:20 CET 2014

Dear All

Running Dialyzer on the module below crashes Dialyzer with the error 

** module


     -spec get_map() -> map().
     get_map() ->
         #{labels => [one, two],
           number => 27,
           [1,2,3] => wer,        %% ok
           {4,5,6} => sdf,        %% ok
           kvok => #{
                 a => qwe,
                 2 => asd,
                 [1,2,3] => wer,  %% bad
                 {4,5,6} => sdf,  %% bad
                 "abc" => zxc

** crash

     $ dialyzer ltu.erl
       Checking whether the PLT /home/ivan/.dialyzer_plt is 
up-to-date... yes
       Proceeding with analysis...
     =ERROR REPORT==== 25-Nov-2014::14:52:50 ===
     Error in process <0.45.0> with exit value: 

     dialyzer: Analysis failed with error:
     Last messages in the log cache:
       Reading files and computing callgraph... done in 0.07 secs
       Removing edges... done in 0.00 secs

If I comment out the two lines marked "%% bad", Dialyzer can check the 
module.  nb the same key-value pairs that are bad in the nested map 
kvok, are ok in the top-level map.

Is this supposed to happen?  If so, why?

With thanks and best wishes


Ivan A. Uemlianin PhD
Speech Technology Research and Development


                         festina lente

More information about the erlang-questions mailing list