mcimadamore@537: /* mcimadamore@537: * @test /nodynamiccopyright/ mcimadamore@914: * @bug 7020044 mcimadamore@537: * mcimadamore@914: * @summary Check that diamond is not allowed with anonymous inner class expressions mcimadamore@914: * @author Maurizio Cimadamore mcimadamore@537: * @compile/fail/ref=Neg09.out Neg09.java -XDrawDiagnostics mcimadamore@537: * mcimadamore@537: */ mcimadamore@537: mcimadamore@537: class Neg09 { mcimadamore@914: class Member {} mcimadamore@537: mcimadamore@914: static class Nested {} mcimadamore@914: mcimadamore@914: void testSimple() { mcimadamore@914: Member m1 = new Member<>() {}; mcimadamore@914: Nested m2 = new Nested<>() {}; mcimadamore@914: } mcimadamore@914: mcimadamore@914: void testQualified() { mcimadamore@914: Member m1 = this.new Member<>() {}; mcimadamore@914: Nested m2 = new Neg09.Nested<>() {}; mcimadamore@914: } mcimadamore@537: }