langtools/test/tools/javac/T6567414.java
author jlahoda
Thu, 09 Oct 2014 10:08:52 +0200
changeset 26993 513b2cae81c3
parent 4704 5206047418c2
permissions -rw-r--r--
8057652: Request to improve error messages for labeled declarations Summary: Parse labeled statements as block statements to improve error recovery for labeled declarations; related cleanup. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4704
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
     1
/*
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
     3
 * @bug 6567414
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
     4
 * @summary javac compiler reports no source file or line on enum constant declaration error
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
     5
 * @compile/fail/ref=T6567414.out -XDrawDiagnostics T6567414.java
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
     6
 */
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
     7
enum Test {
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
     8
  FOO;
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
     9
  Test() throws Exception {}
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
    10
}
5206047418c2 6472751: SourcePositions.getStartPos returns incorrect value for enum constants
jjg
parents:
diff changeset
    11