Summary: | [1.5][compiler] Annotation attribute see members of the annotated type | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | David Audel <david_audel> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | thanson |
Version: | 3.0 | ||
Target Milestone: | 3.1 M6 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
David Audel
2005-02-23 11:45:37 EST
It appears that zzz needs to be qualified. @Annot(foo1=X.zzz) public class X { static final String zzz = ""; } compiles fine with javac. similar bug with qualification and private field. @Annot(foo1=X.zzz) public class X { private static final String zzz = ""; } javac found an error and not jdt compiler p2\X.java:5: zzz has private access in p2.X @Annot(foo1=X.zzz) ^ 1 error Added AnnotationTest#test112 & test114 & test115. Introduced MethodScope#insideTypeAnnotation to be able to exclude offending constructs (type, method and field) from lookup algorithm. Curiously, javac allows resolving method annotation to method type parameters or parameters; which sounds inconsistent; which we also allow as well. Fixed *** Bug 88506 has been marked as a duplicate of this bug. *** Verified in I20050330-0500 |