6922300: [308] populate the reference_info for type annotations targeting primitive class literals

Co-authored-by: Michael Ernst <mernst@cs.washington.edu>
Reviewed-by: darcy, jjg
This commit is contained in:
Mahmood Ali 2010-02-03 11:33:57 -08:00 committed by Jonathan Gibbons
parent 3485352c43
commit 9452aaa027

View File

@ -2158,6 +2158,11 @@ public class Gen extends JCTree.Visitor {
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);