Skip to content

Don't emit inner classes as static classes #6268

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

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

smarter
Copy link
Member

@smarter smarter commented Apr 9, 2019

isOriginallyStaticOwner did the wrong thing and return true for pretty
much any class (because after LambdaLift, all classes are top-level, so
they're always static), this had no effect on Scala code but prevented
Java code from instantiating these classes.

The new implementation is identical to the one used in scalac and
matches the documentation comment for the method.

This allows t10889 from scala/scala#7975 to
pass.

`isOriginallyStaticOwner` did the wrong thing and return true for pretty
much any class (because after LambdaLift, all classes are top-level, so
they're always static), this had no effect on Scala code but prevented
Java code from instantiating these classes.

The new implementation is identical to the one used in scalac and
matches the documentation comment for the method.

This allows t10889 from scala/scala#7975 to
pass.
@smarter smarter requested a review from nicolasstucki April 9, 2019 13:28
@nicolasstucki nicolasstucki merged commit 0c95f6e into scala:master Apr 9, 2019
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.

2 participants