Neg09b.java revision 3591:8382e92dd1f9
1/*
2 * @test /nodynamiccopyright/
3 * @bug 7020044 8062373
4 *
5 * @summary  Check that diamond is not allowed with anonymous inner class expressions at source < 9
6 * @author Maurizio Cimadamore
7 * @compile/fail/ref=Neg09b.out Neg09b.java -source 8 -XDrawDiagnostics
8 *
9 */
10
11class Neg09b {
12
13    static class Nested<X> {}
14
15    void testSimple() {
16        Nested<?> m2 = new Nested<>() {};
17    }
18
19}
20