Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Companions and nested classes are nestmates#10765

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
som-snytt wants to merge1 commit intoscala:2.13.x
base:2.13.x
Choose a base branch
Loading
fromsom-snytt:issue/6882-nestmates

Conversation

som-snytt
Copy link
Contributor

@som-snyttsom-snytt commentedApr 23, 2024
edited
Loading

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

Contingent only on JDK 11 target.

@scala-jenkinsscala-jenkins added this to the2.13.15 milestoneApr 23, 2024
@SethTisue

This comment was marked as resolved.

@SethTisue

This comment was marked as resolved.

@som-snytt
Copy link
ContributorAuthor

som-snytt commentedApr 23, 2024
edited
Loading

"Just a WIP."

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

@SethTisueSethTisue modified the milestones:2.13.15,2.13.16Aug 14, 2024
@som-snyttsom-snytt changed the title[WIP] companion nestCompanions and nested classes are nestmatesAug 27, 2024
@som-snytt
Copy link
ContributorAuthor

som-snytt commentedAug 27, 2024
edited
Loading

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-snyttsom-snytt marked this pull request as ready for reviewAugust 27, 2024 14:01
@SethTisueSethTisue marked this pull request as draftNovember 6, 2024 18:06
@SethTisueSethTisue modified the milestones:2.13.16,2.13.17Dec 12, 2024
@som-snytt
Copy link
ContributorAuthor

It would be nice to have a POC.

@lrytz
Copy link
Member

IIUC in this PR you're using nestmates to avoidmakeNotPrivate, which is is nice for better encapsulation. Are there also cases where we could avoid emitting synthetic accessors that are currently needed?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
2.13.17
Development

Successfully merging this pull request may close these issues.

4 participants
@som-snytt@SethTisue@lrytz@scala-jenkins

[8]ページ先頭

©2009-2025 Movatter.jp