[erlang-bugs] dialyzer: false function has no local return warning in R14B?

Kostis Sagonas <>
Thu Nov 4 23:22:12 CET 2010


Klas Johansson wrote:
> Hi,
> 
> I get a warning from dialyzer when using ets:select (test case
> attached), but it seems like a false warning.  The fact that the key
> (#r.k) is a tuple rather than an atom seems important - there's no
> warning if it's an atom.
> 
> This is on R14B (as well as earlier versions).
> 
> Any ideas?

You are sort of right that this is related to the declaration of #r{} 
and its fields. But this is not a dialyzer bug!

Instead, it's a bug in the ms_transform parse transformation which is 
not aware of type declarations in records and messes up things.

To verify that this is the case either comment out the line:

-include_lib("stdlib/include/ms_transform.hrl").

which enables the parse transform, or simply take out the type 
declaration from the record.  Dialyzer will then like your module :-)

I am leaving this to the person responsible for the ms parse transform 
to fix.

Kostis


More information about the erlang-bugs mailing list