langtools/test/tools/javac/generics/diamond/8065986/T8065986b.java
author mcimadamore
Fri, 28 Nov 2014 11:45:56 +0000
changeset 27856 d4711a6931e2
child 29776 984a79b71cfe
permissions -rw-r--r--
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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27856
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
     1
/*
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
     3
 * @bug 8065986
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
     4
 *
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
     5
 * @summary Compiler fails to NullPointerException when calling super with Object<>()
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
     6
 * @compile/fail/ref=T8065986b.out T8065986b.java -XDrawDiagnostics
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
     7
 *
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
     8
 */
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
     9
import java.util.ArrayList;
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    10
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    11
class T8065986b {
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    12
    T8065986b() {
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    13
        this(new Object<>());
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    14
    }
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    15
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    16
    T8065986b(boolean b) {
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    17
        this(new ArrayList<>());
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    18
    }
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    19
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    20
    T8065986b(boolean b1, boolean b2) {
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    21
        this(()->{});
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    22
    }
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    23
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    24
    T8065986b(boolean b1, boolean b2, boolean b3) {
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    25
        this(T8065986b::m);
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    26
    }
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    27
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    28
    T8065986b(boolean cond, Object o1, Object o2) {
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    29
        this(cond ? o1 : o2);
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    30
    }
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    31
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    32
    static void m() { }
d4711a6931e2 8065986: Compiler fails to NullPointerException when calling super with Object<>()
mcimadamore
parents:
diff changeset
    33
}