blob: 96d58d2620b762e6707b7a5a4c57b0d7ca5cd949 [file] [log] [blame]
/*
* @test /nodynamiccopyright/
* @author Maurizio Cimadamore
* @bug 6557182
* @summary Unchecked warning *and* inconvertible types
* @compile/fail/ref=T6557182.out -XDrawDiagnostics -Xlint:unchecked T6557182.java
*/
class T6557182 {
<T extends Number & Comparable<String>> void test1(T t) {
Comparable<Integer> ci = (Comparable<Integer>) t;
}
<T extends Number & Comparable<? extends Number>> void test2(T t) {
Comparable<Integer> ci = (Comparable<Integer>) t;
}
}