-
Notifications
You must be signed in to change notification settings - Fork 21
flaky match may not be exhaustive in case of tuples #12341
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
Comments
Does the same happen if JoinedStructure3.unapply returns |
That's a good, point there is actually no reason to have the default case in the unapply method, going to try that one out. |
They need an |
I know you are joking a bit but it's not entirely wrong. I see often that e.g. deprecations are suppressed for whole classes/traits where it would be better if they are suppressed for the very usage only |
Yes, usually I am joking a bit but not entirely wrong. I think this is why go and scala have resisted the warnings and suppression dance. I have come around to the viewpoint that anything short of incorrectness (an error) should be treated by a 3rd party tool (linter) where local preferences determine policy. For example, suppressing too much might error. OTOH, I don't like how this plays out IRL, where "style policies" fail the build on dubious grounds. |
The ticket for meta-lint is #13057 |
reproduction steps
Unfortunately, hard to reproduce as the error does not always occur and it happens in close-source code, so I cannot share a real example. I tried to reproduce it with the following on scastie but it compiles correctly:
As context, in the real world example it is a slick Query which is inner joined, and the problem also occurs when using
map
not onlyfilter
.problem
It happens, but not in all cases, that the compiler emits a warning:
As shown above in the example, when I am not using the helper construct but
((a, b), c)
then I never have the problem.Also, the helper construct also exists for more than 3 joined tables and there we never run into the problem.
I know, the bug report is a bit fuzzy but I hope it helps nonetheless to track down the problem.
The text was updated successfully, but these errors were encountered: