File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -742,17 +742,22 @@ object Scanners {
742
742
if (token == INTERPOLATIONID ) {
743
743
nextRawChar()
744
744
if (ch == '\" ' ) {
745
- nextRawChar()
746
- if (ch == '\" ' ) {
745
+ if (lookaheadChar() == '\" ' ) {
746
+ nextRawChar()
747
+ offset += 3
747
748
nextRawChar()
748
749
stringPart(multiLine = true )
749
750
}
750
751
else {
752
+ nextChar()
751
753
token = STRINGLIT
752
754
strVal = " "
753
755
}
754
756
}
755
- else stringPart(multiLine = false )
757
+ else {
758
+ offset += 1
759
+ stringPart(multiLine = false )
760
+ }
756
761
}
757
762
else {
758
763
nextChar()
Original file line number Diff line number Diff line change
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
+ */
You can’t perform that action at this time.
0 commit comments