-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add missing branches to make exhaustiveness check happy #8962
Conversation
Now when I'm looking at it there's still a
|
Is nil passed in your calling code? Otherwise the compiler won't complain. The compiler checks actual values. If you specify a default value but it's not used, the compiler doesn't use it. |
I guess we need to handle |
I wonder why we didn't see this warning before... I think a change to this file was merged after we merge the exhaustiveness check. When I compile the specs for http client I get this:
It's a bit of a mess but it's fine: in the release after 0.34.0 you'll get an error for these, and you'll only see one of them (like all other errors). Then you'll have to add |
@asterite I've added an |
I think we should add the explicit cases false and nil. Then if we decide to add new cases the compiler will tell us. That's the benefit of the change. So we should try to avoid adding else if possible |
@asterite ok, done |
@asterite I rebased master yesterday, but I didn't notice the warnings since the CI was green. |
@j8r It's fine :-) I was worried for a minute that the check was working correctly, but it was just that this was merged after I merged my PR. |
Followup to #8678