Jan Lahoda c30ea9e1d2 8057794: Compiler Error when obtaining .class property
Ensuring a non-null type and sym for illegal T.class to prevent downstream errors.

Reviewed-by: mcimadamore
2014-09-22 14:55:14 +02:00

13 lines
370 B
Java

/**
* @test /nodynamiccopyright/
* @bug 8057794
* @summary The tree for TypeVar.class does not have a type set, which leads to an NPE when
* checking if deferred attribution is needed
* @compile/fail/ref=T8057794.out -XDrawDiagnostics T8057794.java
*/
class T8057794<T> {
void t() {
System.out.println(T.class.getSimpleName());
}
}