Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong type spec for '#is_record-'/1,2 funs generated by exprecs #9

Closed
ddosia opened this issue Sep 4, 2013 · 5 comments
Closed

Wrong type spec for '#is_record-'/1,2 funs generated by exprecs #9

ddosia opened this issue Sep 4, 2013 · 5 comments

Comments

@ddosia
Copy link
Contributor

ddosia commented Sep 4, 2013

Generated spec for '#is_record'/1 is looks like:

-spec '#is_record-'(#doc{}) -> true;
                   (#author{}) -> true;
                   (any()) -> false.

This from dialyzers perspective look like:

Overloaded contract has overlapping domains; such contracts are currently unsupported and are simply ignored

Seems that any() type in last clause overlaps previous clauses. Same for '#is_record-'/2.

@ddosia
Copy link
Contributor Author

ddosia commented Sep 4, 2013

If rewrite spec like this then warning is disappears:

-spec '#is_record-'(#doc{} | #author{} | any()) -> boolean().

But not quite sure that this is make sense.

If you suggest any acceptable solution I would love to send you fix.

@ddosia
Copy link
Contributor Author

ddosia commented Sep 4, 2013

Forget to mention, erlang R15B02

@ddosia
Copy link
Contributor Author

ddosia commented Sep 4, 2013

Seems that I am looking into wrong repo, this was fixed in esl's repo:
esl@fb08d7e

@ddosia ddosia closed this as completed Sep 4, 2013
@uwiger
Copy link
Owner

uwiger commented Sep 4, 2013

Reminds me that the repos had gotten out of sync. Will try to address that. Thanks.

@ddosia
Copy link
Contributor Author

ddosia commented Sep 4, 2013

What confused me that on esl's page it is written that originally that was forked from here, that is why I took this repo as a main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants