Maurizio Cimadamore 7613f7a72c 6956758: NPE in com.sun.tools.javac.code.Symbol - isSubClass
Use of TransTypes.cast() instead of TransTypes.coerce() causes NPE in Lower

Reviewed-by: jjg
2010-12-03 16:31:23 +00:00

21 lines
420 B
Java

/*
* @test /nodynamiccopyright/
* @bug 6956758
*
* @summary NPE in com.sun.tools.javac.code.Symbol - isSubClass
* @author Maurizio Cimadamore
* @compile/fail/ref=T6956758neg.out -XDrawDiagnostics T6956758neg.java
*
*/
class T6956758neg {
interface I {}
static class C {
<T extends Object & I> T cloneObject(T object) throws Exception {
return (T)object.clone();
}
}
}