test/tools/javac/generics/diamond/8065986/T8065986a.java

Thu, 12 Nov 2015 22:10:46 +0000

author
mcimadamore
date
Thu, 12 Nov 2015 22:10:46 +0000
changeset 3002
0caab0d65a04
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

     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  */
     9 import java.util.ArrayList;
    11 class T8065986a {
    12     T8065986a() {
    13         super(new Object<>());
    14     }
    16     T8065986a(boolean b) {
    17         super(new ArrayList<>());
    18     }
    20     T8065986a(boolean b1, boolean b2) {
    21         super(()->{});
    22     }
    24     T8065986a(boolean b1, boolean b2, boolean b3) {
    25         super(T8065986a::m);
    26     }
    28     T8065986a(boolean cond, Object o1, Object o2) {
    29         super(cond ? o1 : o2);
    30     }
    32     static void m() { }
    33 }

mercurial