jdk-24/test/langtools/tools/javac/generics/wildcards/neg/Unbounded.java
2017-09-12 19:03:39 +02:00

17 lines
333 B
Java

/*
* @test /nodynamiccopyright/
* @bug 4916607
* @summary an unbounded (bivariant) wildcard doesn't allow reading
* @author gafter
*
* @compile/fail/ref=Unbounded.out -XDrawDiagnostics Unbounded.java
*/
import java.util.Stack;
class Bug {
void f() {
Stack<?> stack = null;
String o = stack.pop();
}
}