|
[#317] |
project: compiler |
priority: low |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Philippe |
Burak |
fixed |
2004-04-07 13:58:51.0 |
subject |
Scanner interprets character '\u001A' as an end of file |
code |
object Test {
def main(args: Array[String]): Unit = {
System.out.println("\u001A".length());
}
}
|
what happened |
tmp/test.scala:3: unclosed string literal
System.out.println("\u001A".length());
^
tmp/test.scala:3: ')' expected but eof found.
System.out.println("\u001A".length());
^
two errors found
|
what expected |
There should be no error. The Java spec says: "As a special concession for compatibility with certain operating systems, the ASCII SUB character (\u001a, or control-Z) is ignored if it is the last character in the escaped input stream." That's the only special case for SUB. Therefore, if it is not the last character of the input stream, it must be considered as a normal character and not as an EOF.
|
[back to overview] |