-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no processing of raw unicode escapes under 214
- Loading branch information
Martijn Hoekstra
committed
Aug 20, 2019
1 parent
6010288
commit 734fd23
Showing
7 changed files
with
149 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
t3220-213.scala:9: warning: Unicode escapes in triple quoted strings and raw interpolations are deprecated, use the literal character instead | ||
def inTripleQuoted = """\u000A""" | ||
^ | ||
t3220-213.scala:42: warning: Unicode escapes in triple quoted strings and raw interpolations are deprecated, use the literal character instead | ||
"tab unicode escape in triple quoted string" -> """tab\u0009tab""", | ||
^ | ||
t3220-213.scala:10: warning: Unicode escapes in raw interpolations are deprecated as of scala 2.13.1, and will be removed in scala 2.14 | ||
def inInterpolation = raw"\u000A" | ||
^ | ||
t3220-213.scala:11: warning: Unicode escapes in raw interpolations are deprecated as of scala 2.13.1, and will be removed in scala 2.14 | ||
def inTripleQuotedInterpolation = raw"""\u000A""" | ||
^ | ||
t3220-213.scala:43: warning: Unicode escapes in raw interpolations are deprecated as of scala 2.13.1, and will be removed in scala 2.14 | ||
"tab unicode escape in single quoted raw interpolator" -> raw"tab\u0009tab", | ||
^ | ||
t3220-213.scala:44: warning: Unicode escapes in raw interpolations are deprecated as of scala 2.13.1, and will be removed in scala 2.14 | ||
"tab unicode escape in triple quoted raw interpolator" -> raw"""tab\u0009tab""" | ||
^ | ||
supported | ||
literals that result in tab tab: | ||
literal tab in single quoted string | ||
tab escape char in single quoted string | ||
tab unicode escape in single quoted string | ||
literal tab in triple quoted string | ||
literal tab in triple quoted raw interpolator | ||
literal tab in single quoted raw interpolator | ||
literal tab in triple quoted s interpolator | ||
literal tab in single quoted s interpolator | ||
tab escape char in triple quoted s interpolator | ||
tab escape char in single quoted s interpolator | ||
tab unicode escape in triple quoted s interpolator | ||
tab unicode escape in single quoted s interpolator | ||
|
||
unsupported | ||
literals that result in tab\ttab: | ||
tab escape char in triple quoted string | ||
tab escape char in raw interpolator | ||
|
||
deprecated | ||
literals that result in tab tab: | ||
tab unicode escape in triple quoted string | ||
tab unicode escape in single quoted raw interpolator | ||
tab unicode escape in triple quoted raw interpolator | ||
|
||
after backslashes | ||
List(\, \, u, 0, 0, 4, 0) | ||
List(\, u, 0, 0, 4, 0) | ||
List(\, \, u, 0, 0, 4, 0) | ||
List(\, u, 0, 0, 4, 0) | ||
List(", (, [, ^, ", \, x, 0, 0, -, \, x, 1, F, \, x, 7, F, \, \, ], |, \, \, [, \, \, ', ", b, f, n, r, t, ], |, \, \, u, [, a, -, f, A, -, F, 0, -, 9, ], {, 4, }, ), *, ") | ||
List(b, a, d, \) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// scalac: -Xsource:2.14 | ||
|
||
object Literals214 { | ||
def inTripleQuoted = """\u000A""" | ||
def inRawInterpolation = raw"\u000A" | ||
def inRawTripleQuoted = raw"""\u000A""" | ||
} | ||
|
||
object Test { | ||
|
||
def main(args: Array[String]): Unit = { | ||
val asList = List('\\', 'u', '0', '0', '0', 'A') | ||
assert(asList == Literals214.inTripleQuoted.toList) | ||
assert(asList == Literals214.inRawInterpolation.toList) | ||
assert(asList == Literals214.inRawTripleQuoted.toList) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.