-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.0, 1.2.2
-
x86, sparc
-
solaris_2.5.1, windows_nt
JDK-1.2beta3-F compiler fails to pass JCK test lang/LEX/lex005/lex00504/lex00504.html.
According to JLS3.4 (p. 14), the ASCII CR character followed by the ASCII LF characted is a valid line terminator and should be processed by the compiler ok.
However, compiler reports the following error compiling example a.java (see source code below):
> java -fullversion
java full version "JDK-1.2beta3-F"
> javac a.java
a.java:3: Identifier expected.
\u000D\u000A
^
1 error
>
// a.java -------------------------
class a {
\u000D\u000A
}
// end a.java ---------------------
Name: skT88420 Date: 10/29/99
java version "1.2.2"
HotSpot VM (1.0fcs, mixed mode, build E)
javac generates following error message:
[10] ep400x004::/quinn/Crap=- javac Crap.java
Crap.java:3: Invalid character constant.
char c = '\u000d';
^
1 error
when compiling the following example:
public class Crap {
public static void main ( String [] args ) {
char c = '\u000d';
System.err.println ( "Done!" );
}
}
>> End of example
javac from JDK 1.1.8 compiles this code without problems.
(Review ID: 97196)
======================================================================
According to JLS3.4 (p. 14), the ASCII CR character followed by the ASCII LF characted is a valid line terminator and should be processed by the compiler ok.
However, compiler reports the following error compiling example a.java (see source code below):
> java -fullversion
java full version "JDK-1.2beta3-F"
> javac a.java
a.java:3: Identifier expected.
\u000D\u000A
^
1 error
>
// a.java -------------------------
class a {
\u000D\u000A
}
// end a.java ---------------------
Name: skT88420 Date: 10/29/99
java version "1.2.2"
HotSpot VM (1.0fcs, mixed mode, build E)
javac generates following error message:
[10] ep400x004::/quinn/Crap=- javac Crap.java
Crap.java:3: Invalid character constant.
char c = '\u000d';
^
1 error
when compiling the following example:
public class Crap {
public static void main ( String [] args ) {
char c = '\u000d';
System.err.println ( "Done!" );
}
}
>> End of example
javac from JDK 1.1.8 compiles this code without problems.
(Review ID: 97196)
======================================================================