1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/generics/diamond/8065986/T8065986b.java Thu Nov 12 22:10:46 2015 +0000 1.3 @@ -0,0 +1,33 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 8065986 1.7 + * 1.8 + * @summary Compiler fails to NullPointerException when calling super with Object<>() 1.9 + * @compile/fail/ref=T8065986b.out T8065986b.java -XDrawDiagnostics 1.10 + * 1.11 + */ 1.12 +import java.util.ArrayList; 1.13 + 1.14 +class T8065986b { 1.15 + T8065986b() { 1.16 + this(new Object<>()); 1.17 + } 1.18 + 1.19 + T8065986b(boolean b) { 1.20 + this(new ArrayList<>()); 1.21 + } 1.22 + 1.23 + T8065986b(boolean b1, boolean b2) { 1.24 + this(()->{}); 1.25 + } 1.26 + 1.27 + T8065986b(boolean b1, boolean b2, boolean b3) { 1.28 + this(T8065986b::m); 1.29 + } 1.30 + 1.31 + T8065986b(boolean cond, Object o1, Object o2) { 1.32 + this(cond ? o1 : o2); 1.33 + } 1.34 + 1.35 + static void m() { } 1.36 +}