mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
16 lines
333 B
Java
16 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();
|
|
}
|
|
}
|