Skip to content

Conversation

IgnatBeresnev
Copy link
Member

This PR fixes 3 issues that all came from the same place. See the tests, there's one for each issue.

Fixes #2509
Fixes #2551
Fixes #2350

I've also tried to make it so that it doesn't lead to build failures in case some other corner case is not covered, although it might come with some signature bugs for such situations.

Note

Source code

@SimpleAnnotation(clazz = String[].class)

Will be rendered as

@SimpleAnnotation(clazz = String::class)

This is probably incorrect and it might be better to generate Array::class instead, but I've had a look at how we handle such cases for Kotlin sources and it's actually generating String::class, so I think it's better to have the same behaviour for both Kotlin and Java. This is to be discussed and fixed separately as it would require introducing changes to the annotations model.

@IgnatBeresnev IgnatBeresnev requested a review from vmishenev July 3, 2022 18:00
@IgnatBeresnev IgnatBeresnev merged commit 3332f9f into master Jul 7, 2022
@IgnatBeresnev IgnatBeresnev deleted the java-annotations-cornercases branch July 7, 2022 11:30
IgnatBeresnev added a commit that referenced this pull request Jul 11, 2022
Fixes #2509
Fixes #2551
Fixes #2350

(cherry picked from commit 3332f9f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant