T8065986a.java revision 2738:caa3490d5aee
1/* 2 * @test /nodynamiccopyright/ 3 * @bug 8065986 4 * 5 * @summary Compiler fails to NullPointerException when calling super with Object<>() 6 * @compile/fail/ref=T8065986a.out T8065986a.java -XDrawDiagnostics 7 * 8 */ 9import java.util.ArrayList; 10 11class T8065986a { 12 T8065986a() { 13 super(new Object<>()); 14 } 15 16 T8065986a(boolean b) { 17 super(new ArrayList<>()); 18 } 19 20 T8065986a(boolean b1, boolean b2) { 21 super(()->{}); 22 } 23 24 T8065986a(boolean b1, boolean b2, boolean b3) { 25 super(T8065986a::m); 26 } 27 28 T8065986a(boolean cond, Object o1, Object o2) { 29 super(cond ? o1 : o2); 30 } 31 32 static void m() { } 33} 34