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

Fix Dialyzer errors #5

Merged
merged 1 commit into from
Jul 6, 2017
Merged

Fix Dialyzer errors #5

merged 1 commit into from
Jul 6, 2017

Conversation

jdemaris
Copy link

@jdemaris jdemaris commented Jul 6, 2017

Anyone who uses expostal along with Dialyzer will have unsolvable type-spec errors right now because Dialyzer can't peer into the NIF to see what the actual return will be - it will assume that the functions parse_address() and expand_address() only call exit() - and as a result it is a no_return instead of whatever is written into the typespec.

This PR uses a workaround to still raise the error when the NIF isn't loaded, but to let Dialyzer know what the actual returns can be. It also fixes the typespec for parse_address to indicate that it actually returns a map, not a string.

@xiamx xiamx merged commit 3d1c372 into SweetIQ:master Jul 6, 2017
@xiamx
Copy link
Contributor

xiamx commented Jul 6, 2017

Thanks @jdemaris

xiamx added a commit that referenced this pull request Jul 6, 2017
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

Successfully merging this pull request may close these issues.

2 participants