Skip to content
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

ProtoTypes#normalizedCompatible: keep more constraints #12924

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

smarter
Copy link
Member

@smarter smarter commented Jun 24, 2021

Remove the extra condition where we only kept constraints if the new
TyperState does not contain new type variables, this used to be needed
to compile tests/pos/i6682a.scala with -Ycheck:all, otherwise we would
get:

assertion failed: Types differ
Original type : (y: PolyFunction{apply: [T](y: T): y.type => Int}): y.type => Int
After checking: (y: PolyFunction{apply: [T](y: T): y.type => Int}): y.type => Int

But it turns out that 55a223c fixed
that.

Fixes #12126.

Remove the extra condition where we only kept constraints if the new
TyperState does not contain new type variables, this used to be needed
to compile tests/pos/i6682a.scala with -Ycheck:all, otherwise we would
get:

assertion failed: Types differ
Original type : (y: PolyFunction{apply: [T](y: T): y.type => Int}): y.type => Int
After checking: (y: PolyFunction{apply: [T](y: T): y.type => Int}): y.type => Int

But it turns out that 55a223c fixed
that.

Fixes scala#12126.
@scala scala deleted a comment from dottybot Jun 24, 2021
@scala scala deleted a comment from dottybot Jun 24, 2021
@scala scala deleted a comment from dottybot Jun 24, 2021
@scala scala deleted a comment from dottybot Jun 24, 2021
@smarter smarter requested a review from odersky June 24, 2021 23:09
@odersky odersky merged commit 0722bf4 into scala:master Jun 25, 2021
@odersky odersky deleted the fix-i12126 branch June 25, 2021 09:34
@Kordyjan Kordyjan added this to the 3.0.2 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants