Thu, 12 Nov 2015 22:10:46 +0000
8065986: Compiler fails to NullPointerException when calling super with Object<>()
Summary: Missing POLY kind selector on recursive constructor calls with poly arguments
Reviewed-by: vromero
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8065986
4 *
5 * @summary Compiler fails to NullPointerException when calling super with Object<>()
6 * @compile/fail/ref=T8065986b.out T8065986b.java -XDrawDiagnostics
7 *
8 */
9 import java.util.ArrayList;
11 class T8065986b {
12 T8065986b() {
13 this(new Object<>());
14 }
16 T8065986b(boolean b) {
17 this(new ArrayList<>());
18 }
20 T8065986b(boolean b1, boolean b2) {
21 this(()->{});
22 }
24 T8065986b(boolean b1, boolean b2, boolean b3) {
25 this(T8065986b::m);
26 }
28 T8065986b(boolean cond, Object o1, Object o2) {
29 this(cond ? o1 : o2);
30 }
32 static void m() { }
33 }