langtools/test/tools/javac/literals/T6891079.java
author jjg
Tue, 13 Oct 2009 15:26:30 -0700
changeset 4072 70eaf9773f81
child 34997 8174a7d851fb
permissions -rw-r--r--
6891079: Compiler allows invalid binary literals 0b and oBL Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4072
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
     1
/* @test /nodynamiccopyright/
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
     2
 * @bug 6891079
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
     3
 * @summary Compiler allows invalid binary literals 0b and oBL
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
     4
 * @compile/fail/ref=T6891079.out -XDrawDiagnostics T6891079.java
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
     5
 */
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
     6
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
     7
class Test {
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
     8
    int bi = 0B;
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
     9
    long bl = 0BL;
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
    10
    int xi = 0X;
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
    11
    long xl = 0XL;
70eaf9773f81 6891079: Compiler allows invalid binary literals 0b and oBL
jjg
parents:
diff changeset
    12
}