8061549: Disallow _ as a one-character identifier

Underscore is no longer a one-charater identifier with -source 9

Reviewed-by: mcimadamore, jjg
This commit is contained in:
Jan Lahoda 2014-12-08 18:02:07 +01:00
parent fb05a03095
commit 59b3453845
18 changed files with 197 additions and 87 deletions

View file

@ -1,9 +1,10 @@
/*
* @test /nodynamiccopyright/
* @bug 8007401 8007427
* @bug 8007401 8007427 8061549
* @author sogoel
* @summary Test generation of warnings when '_' is used an identifier
* @compile/fail/ref=IdentifierTest.out -Werror -XDrawDiagnostics IdentifierTest.java
* @compile/fail/ref=IdentifierTest8.out -source 8 -Xlint:-options -Werror -XDrawDiagnostics IdentifierTest.java
* @compile/fail/ref=IdentifierTest9.out -XDrawDiagnostics IdentifierTest.java
*/
import java.util.List;