Community
Participate
Working Groups
Compiler reports an invalid error "A cannot be resolved to a type" for "@A" in the example below. The "@Scope.A(Scope.CONST)" in front of the class declaration is necessary to reproduce the problem. package jsr308.bug.scope; import java.lang.annotation.*; @Scope.A(Scope.CONST) // compiles if this line is commented out! public class Scope { @Target(ElementType.TYPE_USE) @Retention(RetentionPolicy.RUNTIME) @interface A { int value() default -1; } private @A(CONST) A fA; // OK public static final @A int CONST = 1; // A cannot be resolved to a type public static void main(String[] args) throws Exception { Annotation[] annotations = Scope.class.getDeclaredField("CONST").getAnnotatedType().getAnnotations(); System.out.println(java.util.Arrays.asList(annotations)); } }
This problem dates back to Helios, perhaps much earlier than too.
I don't expect to get to this anytime soon.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Still relevant, but sounds more like an academic problem, unless we get reports about real-world occurrence.