Welcome to Scala 3.4.2-RC1-bin-SNAPSHOT-git-a36849f (21.0.2, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> def f(c: Char) = raw"\u%04X".format(c.toInt)
def f(c: Char): String
scala> f('a')
val res0: String = \u0061
Welcome to Scala 2.13.13 (OpenJDK 64-Bit Server VM, Java 21.0.2).
Type in expressions for evaluation. Or try :help.
scala> def f(c: Char) = raw"\u%04X".format(c.toInt)
^
error: invalid unicode escape at index 2 of \u%04X
scala>
:quit
Welcome to Scala 2.13.13 -Xsource:3-cross (OpenJDK 64-Bit Server VM, Java 21.0.2).
Type in expressions for evaluation. Or try :help.
scala> def f(c: Char) = raw"\u%04X".format(c.toInt)
^
error: invalid unicode escape at index 2 of \u%04X
Problem
under -Xsource:3-cross, do not check whether my ignored escape would have been valid if not ignored.
Reproduction steps
Problem
under
-Xsource:3-cross
, do not check whether my ignored escape would have been valid if not ignored.