[erlang-bugs] Typer Bug ?

Kostis Sagonas kostis@REDACTED
Fri Mar 23 09:32:29 CET 2012


On 03/23/2012 09:19 AM, P Arun Babu wrote:
>
> Hi,
>
> typer seems to be producing wrong spec for the below code.

Can you be more specific in what you think is wrong in the specs that 
typer shows?

For example, the -spec is_valid(_) -> boolean(). which is produced for

is_valid (N) ->
     N > 10.

is the correct one. Trust me on that.

> Also, dialyzer with "-Wunmatched_returns -Werror_handling -Wbehaviours
> -Wunderspecs -Woverspecs" shows no warnings.
>
> I am wondering ... is this a bug ?

I do not see something wrong in the code you wrote. (Other than it is 
very ugly and complicated but dialyzer is not a style checker.) Since 
presumably you are the author of the code, what do you think is wrong 
with it?

Kostis



More information about the erlang-bugs mailing list