dialyzer bug?

Tobias Lindahl <>
Thu Apr 14 11:51:52 CEST 2005


Thanks for the report. We already have a patch that solves the problem.
The patch can be found at the Dialyzer homepage

http://www.it.uu.se/research/group/hipe/dialyzer/

Tobias

On Thu, 14 Apr 2005, Samuel Rivas wrote:

> Hi,
>
> Next code makes dialyzer to output an error:
>
> -module(test).
> -export([test/1]).
>
> test(Foo) ->
>         Foo/bar.
>
> When dialyzer (v1.3.0) tries to analyse it the next error rises:
>
> <HiPE (v 3.4.0)> Error: [hipe:781]: ERROR: {function_clause,
>                                                [{hipe_icode_type,
>                                                     find_signature_mfa,
>                                                     ['/']},
>                                                 {hipe_icode_type,
>                                                     find_plt_return,
>                                                     2},
>                                                 {hipe_icode_type,
>                                                     check_for_tuple_as_fun,
>                                                     2},
>                                                 {hipe_icode_type,
>                                                     warn_on_call_1,
>                                                     3},
>                                                 {hipe_icode_type,
>                                                     warn_on_call,
>                                                     4},
>                                                 {hipe_icode_type,
>                                                     warn_on_instr,
>                                                     3},
>                                                 {hipe_icode_type,warn_on_bb,3},
>                                                 {hipe_icode_type,
>                                                     warn_on_type_errors,
>                                                     5}]}
>
> I found this error in a bigger project (a confusion with bit syntax led
> me to write Something = Stuff/binary), the behaviour was slightly
> different when dialyzer tried to read the wrong code within the whole
> project analysis, it showed the error in the warning window, in the test
> case the error is shown in a separate window. Sadly I wasn't able to
> write a synthetic test that achieves the same result :(
>
> Aside, experimenting with the compiler I found out that expressions like
> a/b, a+b, ... generate a warning, but expressions like A/b don't. I
> suppose it would be wise to warn in all these cases.
>
> Regards
> --
> 	Samuel
>



More information about the erlang-questions mailing list