mcimadamore@210: /** jjg@384: * @test /nodynamiccopyright/ mcimadamore@210: * @bug 6315770 mcimadamore@210: * @summary javac inference allows creation of strange types: Integer & Runnable mcimadamore@210: * @author Maurizio Cimadamore mcimadamore@210: * mcimadamore@210: * @compile/fail/ref=T6315770.out T6315770.java -XDrawDiagnostics mcimadamore@210: */ mcimadamore@210: mcimadamore@210: class T6315770 { mcimadamore@210: T6315770 m() { mcimadamore@210: return null; mcimadamore@210: } mcimadamore@210: void test() { mcimadamore@210: T6315770 c1 = m(); mcimadamore@210: T6315770 c2 = m(); mcimadamore@210: T6315770 c3 = m(); mcimadamore@210: } mcimadamore@210: }