提交 8b6b2c70 编写于 作者: J jjg

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
上级 f0872129
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册