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 @@ -749,17 +749,22 @@ object Scanners {
749
749
if (token == INTERPOLATIONID ) {
750
750
nextRawChar()
751
751
if (ch == '\" ' ) {
752
- nextRawChar()
753
- if (ch == '\" ' ) {
752
+ if (lookaheadChar() == '\" ' ) {
753
+ nextRawChar()
754
+ // offset += 3 // first part is positioned at the quote
754
755
nextRawChar()
755
756
stringPart(multiLine = true )
756
757
}
757
758
else {
759
+ nextChar()
758
760
token = STRINGLIT
759
761
strVal = " "
760
762
}
761
763
}
762
- else stringPart(multiLine = false )
764
+ else {
765
+ // offset += 1 // first part is positioned at the quote
766
+ stringPart(multiLine = false )
767
+ }
763
768
}
764
769
else {
765
770
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