-
-
Notifications
You must be signed in to change notification settings - Fork 28
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 warnings #46
Fix warnings #46
Conversation
There is still one warning left, but this looks like a compiler issue if I'm not mistaken?
|
What version is that on @dvic ? |
1.2.0 |
I think I see what's going on: if I add pub fn try_call_timeout_test() {
let parent_subject = process.new_subject()
process.start(linked: True, running: fn() {
// Send the call subject to the parent
let child_subject = process.new_subject()
process.send(parent_subject, child_subject)
// Wait for the subject to be called
let assert Ok(_) = process.receive(child_subject, 50)
// Never reply
process.sleep(100)
})
let assert Ok(call_subject) = process.receive(parent_subject, 50)
// Call the child process over the subject
let assert Error(process.CallTimeout) =
process.try_call(call_subject, fn(x) { x }, 10)
Nil
} hence the warning, it should use |
Thank you. What version of OTP? I'm surprised we're seeing this only now. |
26.2.5, I just tried it with |
Looks like this was indeed intentionally fixed on OTP 26 erlang/otp#6915 |
So if I'm reading this right it is now invalid to have a type parameter that is only used right. Does that match your understanding? |
Yes, that’s what I also make of it. |
Or maybe if ‘when XYZ :: term’ is added, the warning goes away? Not sure |
OK I think this requires a compiler fix. Could you open an issue in the compiler repo with that link, I think we need to replace single type variables with |
@lpil this one got closed by accident because of #3247, that PR only fixed the unbound types issue. This PR also fixed some regular warnings (unnecessary asserts): |
Fix warnings as of
1.2.0-rc21.2.0