6993304: JavacTrees.getAttrContext not updated to Tree.Kind.{ANNOTATION_TYPE,ENUM,INTERFACE}
Reviewed-by: mcimadamore
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java Thu Oct 28 18:58:43 2010 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java Fri Oct 29 12:47:49 2010 -0700
@@ -282,9 +282,10 @@
// System.err.println("COMP: " + ((JCCompilationUnit)tree).sourcefile);
env = enter.getTopLevelEnv((JCCompilationUnit)tree);
break;
+ case ANNOTATION_TYPE:
case CLASS:
+ case ENUM:
case INTERFACE:
- case ENUM:
// System.err.println("CLASS: " + ((JCClassDecl)tree).sym.getSimpleName());
env = enter.getClassEnv(((JCClassDecl)tree).sym);
break;
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Thu Oct 28 18:58:43 2010 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Fri Oct 29 12:47:49 2010 -0700
@@ -113,9 +113,10 @@
p.pos = frame.pos;
return p;
+ case ANNOTATION_TYPE:
case CLASS:
+ case ENUM:
case INTERFACE:
- case ENUM:
p.pos = frame.pos;
if (((JCClassDecl)frame).extending == tree) {
p.type = TargetType.CLASS_EXTENDS;