src/share/classes/com/sun/tools/javac/comp/Attr.java

changeset 7
d472e2fbcc39
parent 6
40813968849e
child 9
f09d6a3521b1
equal deleted inserted replaced
6:40813968849e 7:d472e2fbcc39
2512 // if first bound was a typevar, do not accept further bounds. 2512 // if first bound was a typevar, do not accept further bounds.
2513 if (tree.bounds.tail.nonEmpty()) { 2513 if (tree.bounds.tail.nonEmpty()) {
2514 log.error(tree.bounds.tail.head.pos(), 2514 log.error(tree.bounds.tail.head.pos(),
2515 "type.var.may.not.be.followed.by.other.bounds"); 2515 "type.var.may.not.be.followed.by.other.bounds");
2516 tree.bounds = List.of(tree.bounds.head); 2516 tree.bounds = List.of(tree.bounds.head);
2517 a.bound = bs.head;
2517 } 2518 }
2518 } else { 2519 } else {
2519 // if first bound was a class or interface, accept only interfaces 2520 // if first bound was a class or interface, accept only interfaces
2520 // as further bounds. 2521 // as further bounds.
2521 for (JCExpression bound : tree.bounds.tail) { 2522 for (JCExpression bound : tree.bounds.tail) {

mercurial