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
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java Wed Feb 03 11:28:21 2010 -0800
+++ b/langtools/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);