I ran into a problem with String Interpolation and the backslash operator in Scala 2.12.1. All the lines compile except for the last one. Is this a compiler bug or am I missing something?
class Sample {
val thisWorks0 = “\n"
val thisWorks1 = “’“
val thisWorks2 = “”“
val thisWorks3 = s”\n"
val thisWorks4 = s”’“
val thisFails = s”””
}
Compiler complains:
Error:(37, 23) unclosed string literal
val thisFails = s"""