Maurizio Cimadamore 1b000de186 7123100: javac fails with java.lang.StackOverflowError
Inference of under-constrained type-variables creates erroneous recursive wildcard types

Reviewed-by: jjg
2012-01-12 15:28:34 +00:00

17 lines
336 B
Java

/*
* @test /nodynamiccopyright/
* @bug 7123100
* @summary javac fails with java.lang.StackOverflowError
* @compile/fail/ref=T7123100c.out -Werror -Xlint:unchecked -XDrawDiagnostics T7123100c.java
*/
class T7123100c {
<E> E m(E e) {
return null;
}
<Z> void test(Enum<?> e) {
Z z = (Z)m(e);
}
}