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 starting the REPL session with -Xno-uescape, the REPL becomes unusable:
x:\Scala\scala-2.12.0-M4\bin>scala -Xno-uescape
Welcome to Scala 2.12.0-M4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_74).
Type in expressions for evaluation. Or try :help.
scala> object A
<console>:10: error: invalid escape character
+ "defined object " + "A" + "\u000A"
^
The problem can be traced to scala.tools.nsc.interpreter.ReplStrings.string2code(str: String) which invokes Chars.char2uescape(c) on any control character.
A proposed fix would be to inline control characters' integer values and circumvent said escaping altogether.
Here is a quick hack which seems to do the trick via a specialized pattern match on the unix newline \n instead of \u000A
[https://github.com/melezov/scala/commit/c2fdafc55eeb129ac778e54007ac54cdf88357c3]
The text was updated successfully, but these errors were encountered:
If starting the REPL session with
-Xno-uescape
, the REPL becomes unusable:The problem can be traced to
scala.tools.nsc.interpreter.ReplStrings.string2code(str: String)
which invokesChars.char2uescape(c)
on any control character.A proposed fix would be to inline control characters' integer values and circumvent said escaping altogether.
Here is a quick hack which seems to do the trick via a specialized pattern match on the unix newline
\n
instead of\u000A
[https://github.com/melezov/scala/commit/c2fdafc55eeb129ac778e54007ac54cdf88357c3]
The text was updated successfully, but these errors were encountered: