langtools/test/tools/javac/generics/diamond/neg/Neg21.java
changeset 32910 064f2f066668
equal deleted inserted replaced
32909:989fef2663d2 32910:064f2f066668
       
     1 /*
       
     2  * @test /nodynamiccopyright/
       
     3  * @bug 8132535
       
     4  * @summary Compiler fails with diamond anonymous class creation with intersection bound of enclosing class.
       
     5  * @compile/fail/ref=Neg21.out Neg21.java -XDrawDiagnostics
       
     6  */
       
     7 
       
     8 public class Neg21 <T extends java.io.Serializable & Cloneable> {
       
     9 
       
    10     class A <X>{}
       
    11 
       
    12     public void foo(){
       
    13         new Neg21<>().new A<>(){} ;
       
    14     }
       
    15 }