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