-
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.
Allow two trailing slashes, more tests
- Loading branch information
Showing
9 changed files
with
69 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
t6476.scala:8: error: unclosed string literal | ||
mimi"\" | ||
^ | ||
1 error |
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,9 @@ | ||
// only the last one doesn't parse | ||
class C { | ||
mimi"""\ """ | ||
mimi"""\\""" | ||
mimi"""\""" | ||
mimi"\ " | ||
mimi"\\" | ||
mimi"\" | ||
} |
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,7 @@ | ||
t6476b.scala:2: error: invalid escape at terminal index 0 in "\". Use \\ for literal \. | ||
val sa = s"""\""" | ||
^ | ||
t6476b.scala:4: error: invalid escape '\ ' not one of [\b, \t, \n, \f, \r, \\, \", \', \uxxxx] at index 0 in "\ ". Use \\ for literal \. | ||
val sc = s"""\ """ | ||
^ | ||
2 errors |
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,8 @@ | ||
class C { | ||
val sa = s"""\""" | ||
val sb = s"""\\""" | ||
val sc = s"""\ """ | ||
val ra = raw"""\""" | ||
val rb = raw"""\\""" | ||
val rc = raw"""\ """ | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
"Hello", Alice | ||
"Hello", Alice | ||
"Hello", Alice | ||
"Hello", Alice | ||
\"Hello\", Alice | ||
\"Hello\", Alice | ||
\TILT\ | ||
\TILT\ | ||
\\TILT\\ | ||
\TILT\ | ||
\TILT\ | ||
\\TILT\\ | ||
\TILT\ |
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,23 @@ | ||
object Test { | ||
def main(args: Array[String]): Unit = { | ||
val person = "Alice" | ||
println(s"\"Hello\", $person") | ||
println(s"""\"Hello\", $person""") | ||
|
||
println(f"\"Hello\", $person") | ||
println(f"""\"Hello\", $person""") | ||
|
||
println(raw"\"Hello\", $person") | ||
println(raw"""\"Hello\", $person""") | ||
|
||
println(s"\\TILT\\") | ||
println(f"\\TILT\\") | ||
println(raw"\\TILT\\") | ||
|
||
println(s"""\\TILT\\""") | ||
println(f"""\\TILT\\""") | ||
println(raw"""\\TILT\\""") | ||
|
||
println(raw"""\TILT\""") | ||
} | ||
} |