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 4931647
|
|
|
|
* @summary an extends-bound (covariant) wildcard is like readonly
|
|
|
|
* @author gafter
|
|
|
|
*
|
2015-05-15 18:03:51 -07:00
|
|
|
* @compile/fail/ref=Readonly.out -XDrawDiagnostics Readonly.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class Err<T> {
|
|
|
|
Err<T> get() { return null; }
|
|
|
|
void put(Err<T> t) {}
|
|
|
|
|
|
|
|
static void f(Err<? extends String> e) {
|
|
|
|
e.put(e.get());
|
|
|
|
}
|
|
|
|
}
|