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

Add modifiers to TypeParameter for kotlin #3698

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Conversation

kunli2
Copy link
Contributor

@kunli2 kunli2 commented Nov 16, 2023

Add a list of J.Modifier to J.TypeParameter for Kotlin.
to support variance cases like this :

            @Target(AnnotationTarget.TYPE_PARAMETER)
            annotation class Anno
            class Foo  <   @Anno     out     T :  Any    >  () {}

out will be a modifier of T : Any which is a J.TypeParameter here.

as same as to in and reified keywords.

@kunli2 kunli2 merged commit 5d04f64 into main Nov 16, 2023
1 check passed
@kunli2 kunli2 deleted the addTypeParameterModifiers branch November 16, 2023 22:41
Copy link
Contributor

@knutwannheden knutwannheden left a comment

Choose a reason for hiding this comment

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

@kunli2 I think you may have forgotten to update JavaVisitor. Won't matter for Java, but for Kotlin or other derived languages, unless we there override the corresponding visit method.

@kunli2
Copy link
Contributor Author

kunli2 commented Nov 20, 2023

@kunli2 I think you may have forgotten to update JavaVisitor. Won't matter for Java, but for Kotlin or other derived languages, unless we there override the corresponding visit method.

Thanks, added here 9965bbf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants