[erlang-questions] lists:unzip breaks dialyzer.

Adam Kelly cthulahoops@REDACTED
Tue Jun 17 14:24:09 CEST 2008


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?

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



More information about the erlang-questions mailing list