2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-05-15 01:09:51 -07:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 4916620
|
|
|
|
* @summary legal cast is rejected
|
|
|
|
* @author Christian Plesner Hansen
|
2015-05-15 01:09:51 -07:00
|
|
|
* @compile/ref=T4916620.out -XDrawDiagnostics -Xlint:unchecked T4916620.java
|
2007-12-01 00:00:00 +00:00
|
|
|
* @compile -Xlint:unchecked T4916620.java
|
|
|
|
*/
|
|
|
|
|
|
|
|
public class T4916620 {
|
|
|
|
static class BB<T, S> { }
|
|
|
|
static class BD<T> extends BB<T, T> { }
|
|
|
|
|
|
|
|
void f() {
|
|
|
|
BD<Number> bd = new BD<Number>();
|
|
|
|
BB<? extends Number, ? super Integer> bb = bd;
|
|
|
|
Object o = (BD<Number>) bb;
|
|
|
|
}
|
|
|
|
}
|