changeset 352:f73117585740

bug fix... translate a type apply tree if no annotation is present
author mali
date Fri, 20 Feb 2009 14:26:35 -0500
parents a0b1c1b2efe6
children 67c75844461f
files src/share/classes/com/sun/tools/javac/comp/TransTypes.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Thu Feb 19 16:42:35 2009 -0500
+++ b/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Fri Feb 20 14:26:35 2009 -0500
@@ -742,9 +742,9 @@
      */
     public void visitTypeApply(JCTypeApply tree) {
         List<TypeAnnotations> ta = collectErasedAnnotations(tree.arguments);
+        // Delete all type parameters.
+        JCTree clazz = translate(tree.clazz, null);
         if (!ta.isEmpty()) {
-            // Delete all type parameters.
-            JCTree clazz = translate(tree.clazz, null);
             JCAnnotatedType annotatedType =
                 make.at(tree.pos).AnnotatedType(List.<JCAnnotation>nil(),
                         (JCExpression)clazz);
@@ -752,7 +752,7 @@
             result = annotatedType;
             result.type = clazz.type;
         } else
-            result = tree;
+            result = clazz;
     }
 
 /**************************************************************************