langtools/test/tools/javac/T6231847.java
author shade
Tue, 02 Feb 2016 18:15:15 +0300
changeset 35639 f34e7e8b4eac
parent 28335 0b37a4232e35
permissions -rw-r--r--
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested Reviewed-by: vlivanov, psandoz

/*
 * @test    /nodynamiccopyright/
 * @bug     6231847
 * @summary Crash in com.sun.tools.javac.comp.Attr.visitNewClass:1352
 * @author  Peter von der Ah\u00e9
 * @compile/fail/ref=T6231847.out -XDdev -XDrawDiagnostics T6231847.java
 */

class T6231847 {
    interface T6231847I {}
    static class T6231847C {}

    T6231847 t;
    Object o = new <Object> T6231847I() {};
    Object p = new T6231847I(o) {};
    Object q = t.new T6231847I() {};
    Object r = t.new <Object> T6231847I(o) {};
    Object s = t.new T6231847C() {};
}