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) { |