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

Support inner modifier for java non-static classes #3347

Merged
merged 2 commits into from
Nov 22, 2023
Merged

Conversation

whyoleg
Copy link
Collaborator

@whyoleg whyoleg commented Nov 15, 2023

Fixes #2793

Note: almost all of combinations of parent/nested relations are static by default. Only nesting class inside class or enum could be inner in Kotlin.

P.S. Here is where IDEA renders redundant static modifiers: image image image image

@whyoleg whyoleg self-assigned this Nov 15, 2023
Copy link
Member

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

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

Well done with thinking of corner cases and tests!

@Test
fun `java declarations nested inside annotation interface should not have kotlin inner modifier`() {
val testProject = javaTestProject {
javaFile(pathFromSrc = "JavaAnnotation.java") {
Copy link
Member

Choose a reason for hiding this comment

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

btw, for some reason I didn't expect Java to handle root packages correctly, but apparently it works :)

2023-11-22_02-42-14

@whyoleg whyoleg merged commit 04623bf into master Nov 22, 2023
11 checks passed
@whyoleg whyoleg deleted the java-inner branch November 22, 2023 07:53
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.

Inner java class miss the inner modifier in signature
3 participants