blob: 50c305d70cb6dbc0d810860544ed98a5a899e958 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
trait t6810 {
val x = '\u000A' // char literals accept arbitrary unicode escapes
val y = '
' // but not embedded EOL sequences not represented as escapes
val z = '\n' // normally, expect this escape
val X = "\u000A" // it's the same as ordinary string literals
val Y = "
" // obviously not
val Z = "\n" // normally, expect this escape
val A = """
""" // which is what these are for
val B = s"""
""" // or the same for interpolated strings
import scala.compat.Platform.EOL
val `\u000A` = EOL // backquoted identifiers are arbitrary string literals
val `
` = EOL // not raw string literals aka triple-quoted, multiline strings
val a = '\u000D' // similar treatment of CR
val b = '
' // CR seen as EOL by scanner
val c = '\r' // traditionally
}
|