|
Quick Lists
|
|
Bug ID:
|
6891079
|
|
Votes
|
0
|
|
Synopsis
|
Compiler allows invalid binary literals 0b and oBL
|
|
Category
|
java:compiler
|
|
Reported Against
|
b73
|
|
Release Fixed
|
7(b75)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
6860965
,
6869093
|
|
Submit Date
|
13-OCT-2009
|
|
Description
|
Compiler accepts the following invalid code:
public class Test {
public static void main( String argv[] ) {
int i = 0b; // should be compile-time error
long l = 0BL; // should be compile-time error
}
}
according to grammar (http://ccc/6860965) this is invalid:
BinaryNumeral:
0 b BinaryDigits
0 B BinaryDigits
BinaryDigits:
BinaryDigit
BinaryDigit BinaryDigits
BinaryDigit: one of
0 1
This test will be integrated into jck soon.
Posted Date : 2009-10-13 16:45:58.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
Yes, check is missing.
Posted Date : 2009-10-13 20:59:09.0
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |