Closed raptor494 closed 3 years ago
Sorry about that. Which version of Java are you using?
I was aware of the ambiguity of type annotation on enum field; but it worked (on my machine:)
https://github.com/zhong-j-yu/rekex/blob/main/doc/note-misc.txt
If a enum field is annotated with an anno of @Target=Type_USE, it's not clear what happens. Javac allows it, so it appears that it applies on the type of the field. But field.getAnnotatedType() does not contain the anno. And field.getDeclaredAnnotations() does contain the anno.
I think I understand the problem. It is your IDE that reports the error. Since JLS isn't clear on this issue, the IDE cannot be blamed for it. Thanks for reporting.
The issue is fixed in version 1.1.1 - could you try again and see if it works?
Hi @raptor494 , if you have no objections, I'll close this issue as fixed in 24 hours.
Fixed and available since v1.1.1.
When I try to add an @Str or @Ch annotation to an enum field, I get "Syntax error: Type annotations are illegal here." This is probably because those annotations are not declared with @Target including ElementType.FIELD (for enum fields)