We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25cdd9e commit 91783bfCopy full SHA for 91783bf
compiler/src/dotty/tools/dotc/parsing/Scanners.scala
@@ -742,12 +742,13 @@ object Scanners {
742
if (token == INTERPOLATIONID) {
743
nextRawChar()
744
if (ch == '\"') {
745
- nextRawChar()
746
- if (ch == '\"') {
+ if (lookaheadChar() == '\"') {
+ nextRawChar()
747
748
stringPart(multiLine = true)
749
}
750
else {
751
+ nextChar()
752
token = STRINGLIT
753
strVal = ""
754
tests/pos/t7919.scala
@@ -0,0 +1,11 @@
1
+
2
+object X {
3
+ val x = s""
4
+ val y = true
5
+}
6
7
+/* was:
8
+4 | val y = true
9
+ | ^^^
10
+ | end of statement expected but 'val' found
11
+*/
0 commit comments