jdk-24/test/langtools/tools/javac/cast/6467183/T6467183b.java
2017-09-12 19:03:39 +02:00

18 lines
396 B
Java

/*
* @test /nodynamiccopyright/
* @author mcimadamore
* @bug 6467183
* @summary unchecked warning on cast of parameterized generic subclass
* @compile/ref=T6467183b.out -XDrawDiagnostics -Xlint:unchecked T6467183b.java
*/
class T6665356b<T> {
class A<S> {}
class B<X> extends A<X> {}
void cast(A<? extends Number> a) {
Object o = (B<? extends Integer>)a;
}
}