-
Notifications
You must be signed in to change notification settings - Fork 3k
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
broken type spec for socket:sendto/4 in OTP-27.2 #9180
Comments
Hi, Could you please provide the exact dialyzer command? Regards, |
Save the sample snippet to sock.erl, then debug compile sock.erl and make sure you have a plt:
Then run dialyzer on the sock.beam produced by erlc:
Before 27.2 the above used to work without warnings. |
Fixed by #9295 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Between 27.1.3 and 27.2 the type spec for socket:sendto/4 was changed. The updated type spec does no longer allow
nowait
as the value for the 4th parameter.The implementation has not changed and based on the implementation
nowait
is clearly valid.These lines https://github.com/erlang/otp/blob/OTP-27.1.3/lib/kernel/src/socket.erl#L3727-L3728 from 27.1.3 have been lost in PR-8986
To Reproduce
Run dialyzer on this
Results in this error:
Used to work in 27.1
Expected behavior
Call is not reported as violating the function specification.
Affected versions
27.2
The text was updated successfully, but these errors were encountered: