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

Companions and nested classes are nestmates #10765

Draft
wants to merge 1 commit into
base: 2.13.x
Choose a base branch
from

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Apr 23, 2024

Avoid special widened access in ExplicitOuter, compute nestmates in Flatten.

Contingent only on JDK 11 target.

@scala-jenkins scala-jenkins added this to the 2.13.15 milestone Apr 23, 2024
@SethTisue

This comment was marked as resolved.

@SethTisue

This comment was marked as resolved.

@som-snytt
Copy link
Contributor Author

som-snytt commented Apr 23, 2024

"Just a WIP."

The test needs using options jvm 11 from the other PR. Let's see if I can remember the old way.

@SethTisue SethTisue modified the milestones: 2.13.15, 2.13.16 Aug 14, 2024
@som-snytt som-snytt force-pushed the issue/6882-nestmates branch from 9d76195 to 724e15a Compare August 27, 2024 11:15
@som-snytt som-snytt changed the title [WIP] companion nest Companions and nested classes are nestmates Aug 27, 2024
@som-snytt
Copy link
Contributor Author

som-snytt commented Aug 27, 2024

I think I saw that it allowed

TopHeavy$Nested host = TopHeavy$
TopHeavy$ host = TopHeavy
TopHeavy members = TopHeavy$

that is, nest host as transitive. I don't see that supported in the spec. I confirmed that the member was private. oh, Edit: the spec says nest mates are not verified on load but by access, so I need to run the (bad) code. Edit again: it already is a run test.

Flatten was tweaked so that TopHeavy is the host and lists both classes as members. I won't experiment further. That was on Temurin-22.0.2+9 for future reference.

@som-snytt som-snytt marked this pull request as ready for review August 27, 2024 14:01
@SethTisue SethTisue marked this pull request as draft November 6, 2024 18:06
@SethTisue SethTisue modified the milestones: 2.13.16, 2.13.17 Dec 12, 2024
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.

3 participants