mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
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:
parent
3485352c43
commit
9452aaa027
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue