1/** 2 * @test /nodynamiccopyright/ 3 * @bug 6315770 8078024 4 * @summary javac inference allows creation of strange types: Integer & Runnable 5 * @author Maurizio Cimadamore 6 * 7 * @compile/fail/ref=T6315770.out T6315770.java -XDrawDiagnostics 8 */ 9 10class T6315770<V> { 11 <T extends Integer & Runnable> T6315770<T> m() { 12 return null; 13 } 14 void test() { 15 T6315770<?> c1 = m(); 16 T6315770<? extends String> c2 = m(); 17 T6315770<? super String> c3 = m(); 18 } 19} 20