[erlang-questions] lists:unzip breaks dialyzer.

Tobias Lindahl <>
Tue Jun 17 15:07:09 CEST 2008


Adam Kelly wrote:
> Hi,
> 
> I've just run into a weird problem with dialyzer.   A module (see
> below) containing a call to lists:unzip with a list of more
> than a single tuple as an argument seems to crash dialyzer.   Am I
> doing something wrong?

No, this was a bug in Dialyzer. Sometimes it fails to find the bugs in 
itself...

However, you are running R11B-5, and I have fixed the bug since then. I 
suggest you upgrade if you can.

Tobias

> Thanks,
> Adam.
> 
> $ cat test_dia.erl
> -module(test_dia).
> -export([u/0]).
> 
> u() ->
> 	lists:unzip([{a, 1}, {b, 2}]).
> $ erlc +debug_info test_dia.erl
> $ dialyzer -c test_dia.beam
>   Checking whether the initial PLT exists and is up-to-date... yes
>   Proceeding with analysis...
> =ERROR REPORT==== 17-Jun-2008::13:04:56 ===
> Error in process <0.29.0> with exit value:
> {function_clause,[{erl_types,t_tuple_args,[{c,tuple_set,[{c,tuple,[{c,atom,[a],any},{c,number,{int_set,[1]},int}],{2,{c,atom,[a],any}}},{c,tuple,[{c,atom,[b],any},{c,number,{int_set,[2]},int}],{2,{c,atom,[b],any}}}],any}]},{erl_bif_types...
> 
> 
> Analysis failed with error report:
>         {function_clause,[{erl_types,t_tuple_args,
>                                      [{c,tuple_set,[{...}|...],any}]},
>                           {erl_bif_types,'-type/4-anonymous-373-',1},
>                           {dialyzer_dataflow,do_call,4},
>                           {dialyzer_dataflow,traverse,4},
>                           {dialyzer_dataflow,do_clause,7},
>                           {dialyzer_dataflow,handle_clauses,9},
>                           {dialyzer_dataflow,traverse,...},
>                           {dialyzer_dataflow,...}]}
> dialyzer: Internal problems were encountered in the analysis.
> $ dialyzer --version
> Dialyzer version v1.7.0
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list