You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If multiple backslashes was truly allowed then this program would compile:
objectProgram {
val \\\u1234 =""
}
Instead we get:
/home/yuvi/Desktop/Program.scala:2:error: illegal start of simple pattern
val \\\u1234 =""
^
.../Program.scala:3:error: '=' expected but '}' found.
}
^
two errors found
=== What versions of the following are you using? ===
Scala: 2.9.0.final
Java:
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.1) (6b22-1.10.1-0ubuntu1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
Operating system:
Ubuntu 11.04 x64 desktop.
The text was updated successfully, but these errors were encountered:
@adriaanm said:
There seem to be some vestiges of support for multiple backslashes (evenSlashPrefix), but I can't figure out how to exercise that code path. As this seems minor, I just excluded it from the spec so it at least doesn't inspire anyone else to exercise that code path. Even better would be get rid of that supposedly dead code.
@som-snytt said:
In Java, translation of Unicode escapes precedes tokenization. The count of prefixed backslashes is just to specify how you escape a Unicode escape. (It was never intended to consume the prefix.)
=== What steps will reproduce the problem (please be specific and Look at the nightly spec for May 14, 2011 or before.
=== What is the expected behavior? ===
I would expect something like:
See JSL 3.3:
=== What do you see instead? ===
Instead we have this:
=== Additional information ===
This is quite possibly the issue being discussed here: http://scala-programming-language.1934581.n4.nabble.com/Unicode-escapes-td2217591.html. However, I don't see that a ticket was over opened or a correction made.
If multiple backslashes was truly allowed then this program would compile:
Instead we get:
=== What versions of the following are you using? ===
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.1) (6b22-1.10.1-0ubuntu1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
Ubuntu 11.04 x64 desktop.
The text was updated successfully, but these errors were encountered: