[erlang-questions] dialyzer: user-defined types just synonyms?
Fri Apr 23 10:10:48 CEST 2010
So it will warn only if the code will always fail, but will not if it
just _may_ fail. And this behaviour is what it was made for.
I see, thank you.
Tobias Lindahl wrote:
> 2010/4/22 Dmitry Belyaev <>:
>> Good point about unused=untested.
>> Ok, but what about the other problem?
>> There must be warning on line 9. I get nothing with R13b4.
> The return type for get_atom is 'bad' | 'good'.
> The analysis is not strong enough to find that the call at line 7 is
> returning 'bad', so when the return value is used in the call on line
> 9, Dialyzer finds that the intersection between the argument type and
> the success typing is 'good' which means that the call can succeed and
> no warning is emitted.
> The behavior is correct, but one could always whish that the analysis
> was stronger. Remember that Dialyzer is conservative in its warnings.
> It will only warn when it can find that something definitely goes
More information about the erlang-questions