2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-05-15 18:03:51 -07:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 4916607
|
|
|
|
* @summary an unbounded (bivariant) wildcard doesn't allow reading
|
|
|
|
* @author gafter
|
|
|
|
*
|
2015-05-15 18:03:51 -07:00
|
|
|
* @compile/fail/ref=Unbounded.out -XDrawDiagnostics Unbounded.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
import java.util.Stack;
|
|
|
|
class Bug {
|
|
|
|
void f() {
|
|
|
|
Stack<?> stack = null;
|
|
|
|
String o = stack.pop();
|
|
|
|
}
|
|
|
|
}
|