langtools/test/tools/javac/7086595/T7086595.java
author sogoel
Thu, 05 Jun 2014 10:57:10 -0700
changeset 24797 850ebd4d80a7
parent 10626 83f0c2860f5b
permissions -rw-r--r--
8044072: Group 2: create .out files for OverrideChecks tests in tools/javac dir Reviewed-by: jjg

/*
 * @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;
    }
}