mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
6891079: Compiler allows invalid binary literals 0b and oBL
Reviewed-by: darcy
This commit is contained in:
parent
837c2b0a07
commit
51a7e38600
4 changed files with 26 additions and 1 deletions
12
langtools/test/tools/javac/literals/T6891079.java
Normal file
12
langtools/test/tools/javac/literals/T6891079.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* @test /nodynamiccopyright/
|
||||
* @bug 6891079
|
||||
* @summary Compiler allows invalid binary literals 0b and oBL
|
||||
* @compile/fail/ref=T6891079.out -XDrawDiagnostics T6891079.java
|
||||
*/
|
||||
|
||||
class Test {
|
||||
int bi = 0B;
|
||||
long bl = 0BL;
|
||||
int xi = 0X;
|
||||
long xl = 0XL;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue