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

Fix superType of SuperType #17574

Merged
merged 2 commits into from
May 25, 2023
Merged

Fix superType of SuperType #17574

merged 2 commits into from
May 25, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 24, 2023

I am not quite sure about he previous definition of superType in SuperType. I believe it's probably needed for something. But it's clearly wrong if the supertpe argument does not have a symbol. We now fall back to the default

   def superType = underlying

in this case.

Fixes #17555

I am not quite sure abput he previous definition of superType in SuperType.
I believe it's probably needed for something. But it's clearly wrong if
the `supertpe` argument does not have a symbol. We now fall back to the
default `superType = underlying` in this case.

Fixes $17555
@odersky odersky added this to the 3.3.1 milestone May 24, 2023

@main def Test =
println(C())
println(D())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vulpix does not verify output without a check file, so assert is more effective or defensive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes, that was an oversight. Thanks for pointing it out!

@odersky odersky requested a review from dwijnand May 25, 2023 10:01
@odersky odersky merged commit acb3dba into scala:main May 25, 2023
@odersky odersky deleted the fix-17555 branch May 25, 2023 11:40
@Kordyjan Kordyjan modified the milestones: 3.3.1, 3.4.0 Aug 1, 2023
Kordyjan added a commit that referenced this pull request Nov 17, 2023
Backports #17574 to the LTS branch.

PR submitted by the release tooling.
@Kordyjan Kordyjan modified the milestones: 3.4.0, 3.3.2 Dec 14, 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
Development

Successfully merging this pull request may close these issues.

Wrong linearization for super calls in case classes
4 participants