langtools/test/tools/javac/lambda/T8057794.java
author lana
Tue, 25 Apr 2017 07:38:50 +0000
changeset 44909 b53c770dc04f
parent 26780 82b0aaba473d
permissions -rw-r--r--
Added tag jdk-10+1 for changeset 3a409afd3f86
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26780
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
     1
/**
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
     2
 * @test    /nodynamiccopyright/
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
     3
 * @bug     8057794
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
     4
 * @summary The tree for TypeVar.class does not have a type set, which leads to an NPE when
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
     5
 *          checking if deferred attribution is needed
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
     6
 * @compile/fail/ref=T8057794.out -XDrawDiagnostics T8057794.java
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
     7
 */
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
     8
class T8057794<T> {
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
     9
    void t() {
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
    10
        System.out.println(T.class.getSimpleName());
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
    11
    }
82b0aaba473d 8057794: Compiler Error when obtaining .class property
jlahoda
parents:
diff changeset
    12
}