langtools/test/tools/javac/generics/diamond/neg/Neg09b.java
changeset 40504 0a01f6710c84
parent 29776 984a79b71cfe
equal deleted inserted replaced
40503:cb34fd6e8071 40504:0a01f6710c84
       
     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 
       
    11 class Neg09b {
       
    12 
       
    13     static class Nested<X> {}
       
    14 
       
    15     void testSimple() {
       
    16         Nested<?> m2 = new Nested<>() {};
       
    17     }
       
    18 
       
    19 }