scala> util.Properties.versionString
res11: String = version 2.11.2
scala> val a = ""
a: String = ""
scala> val a = "\""
a: String = "
So far so good. Now with the interpolation string, it fails:
scala> val a = s"\""
<console>:1: error: unclosed string literal
val a = s"\""
^
Even after we provide a closed escaped quote.
scala> val a = s"\"\""
<console>:7: error: value \ is not a member of String
val a = s"\"\""
^
Why is this happening?
source
share