changeset 486:f65d652cb6af

6922300: [308] populate the reference_info for type annotations targeting primitive class literals Reviewed-by: darcy, jjg Contributed-by: mali@csail.mit.edu, mernst@cs.washington.edu
author jjg
date Wed, 03 Feb 2010 11:33:57 -0800
parents 41ed86f86585
children 4c844e609d81
files src/share/classes/com/sun/tools/javac/jvm/Gen.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Wed Feb 03 11:28:21 2010 -0800
+++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Wed Feb 03 11:33:57 2010 -0800
@@ -2158,6 +2158,11 @@
             code.emitop2(ldc2, makeRef(tree.pos(), tree.selected.type));
             result = items.makeStackItem(pt);
             return;
+        } else if (tree.name == names.TYPE) {
+            // Set the annotation positions for primitive class literals
+            // (e.g. int.class) which have been converted to TYPE field
+            // access on the corresponding boxed type (e.g. Integer.TYPE).
+            setTypeAnnotationPositions(tree.pos);
         }
 
         Symbol ssym = TreeInfo.symbol(tree.selected);