-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refine Matchtype checking #15423
Refine Matchtype checking #15423
Conversation
Take up scala#13780 again, but refine it so that abstract types are allowed in match type reduction as long as they uniquely instantiate type parameters of the type pattern. Fixes scala#11982
Allow uninstantiated match parameters if the result of the match does not depend on them.
@dwijnand @OlivierBlanvillain can one of you give this a quick review today? It would be good to get this into 3.2. |
Going to merge this now, so that it makes it into 3.2. The alternative would be to keep the unsound previous behavior. |
I was thinking of chatting about it tomorrow afternoon, thinking that was soon enough? Maybe I'm misremembering the 3.2 cutoff date. |
3.2.0-RC1 has already been tagged: https://github.com/lampepfl/dotty/releases/tag/3.2.0-RC1, so this will have to go in 3.2.1 and/or be backported to RC2. |
That's a pity. I would have hoped to get this in, to address the unsoundness. |
Backport #15423: Refine Matchtype checking
Trying to compile https://github.com/lampepfl/dotty/pull/15423/files#diff-4258b2458e1b344a3f6431e949a5c7180a433428ec8c12bd387c68d4c43db534 with 3.2.0-RC2 that includes the backported fix, and this fails. Is this expected? Thanks! |
It's a neg test, right? So yes this would be expected. |
Thanks |
Take up #13780 again, but refine it so that abstract types are allowed in match type
reduction as long as they uniquely instantiate type parameters of the type pattern.
Fixes #11982
Fixes #15352