Neg21.java revision 3040:e6fcc24b6d14
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 8public 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} 16