-
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
Extract GADT constraints from wildcard type arguments #14132
Conversation
This regressed with #12506 (which shipped with 3.0.2). |
@abgruszecki could you review this please, or delegate the review to someone else? |
@dwijnand I was going to prepare a different fix for the problem, but it looks like it's not going to happen any time soon. Let me just suggest a comment that I think should be there and we can merge this PR. |
4567da3
to
d2c9eae
Compare
d2c9eae
to
2f16cc7
Compare
@abgruszecki so it's not clear to me if this change is actually sound? The previous comment mentioned that this was unsound but didn't provide a test case, and the new comment just says this fix isn't "proper" but it's not clear to me what that implies. |
@smarter we don't pass TypeBounds themselves to |
Do you have an example of these edge cases? |
These issues were fixed by the deskolemization PR: |
So after a discussion with Guillaume, there's one more thing that should be said: this PR may have introduced unsoundness into the compiler. I paid too much attention to us regressing after the deskolemization PR, but that PR was actually necessary to fix some soundness issues, like #11103. With that in mind, we should either have a very good & convincing case why this fix is certainly sound, or we should go ahead and rewrite the |
If you can come up with an unsound example, I'm happy to redo this PR. But without more information I wouldn't know which parts of isSubType are the unsound bits and which are the sound ones that should be inlined. Are you free next Tuesday to pair on this in the Scala Spree? |
No description provided.