changeset 779:460b2f588d0d

6993304: JavacTrees.getAttrContext not updated to Tree.Kind.{ANNOTATION_TYPE,ENUM,INTERFACE} Reviewed-by: mcimadamore
author jjg
date Fri, 29 Oct 2010 12:47:49 -0700
parents 2974d3800eb1
children 895bea45a3e8
files src/share/classes/com/sun/tools/javac/api/JavacTrees.java src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Thu Oct 28 18:58:43 2010 -0700
+++ b/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/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Thu Oct 28 18:58:43 2010 -0700
+++ b/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;