Skip to content

Fix "is not a trait" when extending a Java annotation #13225

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

Closed
wants to merge 3 commits into from

Conversation

dwijnand
Copy link
Member

Java annotations are interfaces ("@interface Foo") but we model them as classes to mimic Scala annotations and avoid special-casing. So we add some special-casing in Namer for the not-actually-classes Java annotations.

Also fix "Invalid interfaces" when constructing a annotation subclass

Fixes #12840


I took a bit of a stab at what fixed the two reported cases, so let me know if things should be done differently.

dwijnand added 2 commits July 31, 2021 17:41
Java annotations are interfaces ("@interface Foo") but we model them as
classes to mimic Scala annotations and avoid special-casing.  So we add
some special-casing in Namer for the not-actually-classes Java
annotations.
@dwijnand dwijnand closed this Aug 4, 2021
@dwijnand dwijnand deleted the class-extends-java-annot branch August 4, 2021 15:57
@smarter
Copy link
Member

smarter commented Aug 13, 2021

@dwijnand closed this 9 days ago

Was there some fundamental issue with this approach?

@dwijnand
Copy link
Member Author

No, just toppled the gain/effort balance for me so I dropped it.

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.

is not a trait error when extends Java annotation
2 participants