You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If i place an annotation on an enum value, it doesn't work. It doesn't identify the annotation as a syntax error, but it does mis-highlight it and refuse to import the annotation class (if that is necessary). The same code (when ported) works fine in Java.
If i place an annotation on an enum value, it doesn't work. It doesn't identify the annotation as a syntax error, but it does mis-highlight it and refuse to import the annotation class (if that is necessary). The same code (when ported) works fine in Java.
Here's how I can reproduce it:
@Target([ElementType.FIELD, ElementType.TYPE]) @Retention(RetentionPolicy.RUNTIME) @interface A { String value() }
@A("C") enum E { @A("B") C }
println 'Class annotations = ' + E.class.getAnnotations()
println 'Field annotations = ' + E.class.getField(E.C.name()).getAnnotations()
Class annotations = [@enumsgroovy.A(value=C)]
Field annotations = []
such that it has not found the annotation on E.C.
src.zip
The text was updated successfully, but these errors were encountered: