langtools/test/tools/javac/7086595/T7086595.java
author ysuenaga
Wed, 30 Mar 2016 21:05:13 +0900
changeset 37218 c7241bc368bf
parent 10626 83f0c2860f5b
permissions -rw-r--r--
8151674: STW phases at Concurrent GC should count in PerfCounter Reviewed-by: jmasa, sla, tschatzl

/*
 * @test /nodynamiccopyright/
 * @bug 7086595
 * @summary Error message bug: name of initializer is 'null'
 * @compile/fail/ref=T7086595.out -XDrawDiagnostics T7086595.java
 */

class T7086595 {

    String s = "x";
    String s = nonExistent;

    int foo() {
        String s = "x";
        String s = nonExistent;
    }

    static int bar() {
        String s = "x";
        String s = nonExistent;
    }

    {
        String s = "x";
        String s = nonExistent;
    }

    static {
        String s = "x";
        String s = nonExistent;
    }
}