Scala字符串插值`regex中的raw`前缀

Scala字符串插值`regex中的raw`前缀,scala,string-interpolation,Scala,String Interpolation,raw前缀可用于告诉编译器不要转义字符串中的任何字符。但是当我尝试这样做时,为什么会出现编译错误呢 raw"\d".r // not escaped slash 您使用的是什么版本的Scala?在2.10.0中工作良好: Welcome to Scala version 2.10.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_37). Type in expressions to have them evaluated. Type :hel

raw
前缀可用于告诉编译器不要转义字符串中的任何字符。但是当我尝试这样做时,为什么会出现编译错误呢

raw"\d".r  // not escaped slash

您使用的是什么版本的Scala?在2.10.0中工作良好:

Welcome to Scala version 2.10.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_37).
Type in expressions to have them evaluated.
Type :help for more information.

scala> raw"\d".r
res0: scala.util.matching.Regex = \d

您使用的是什么版本的Scala?在2.10.0中工作良好:

Welcome to Scala version 2.10.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_37).
Type in expressions to have them evaluated.
Type :help for more information.

scala> raw"\d".r
res0: scala.util.matching.Regex = \d

2.10.2字符串插值是在scala 2.10中引入的,我没有在2.10.2上得到任何编译错误。字符串插值是在scala 2.10中引入的