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 {
749749 if (token == INTERPOLATIONID ) {
750750 nextRawChar()
751751 if (ch == '\" ' ) {
752- nextRawChar()
753- if (ch == '\" ' ) {
752+ if (lookaheadChar() == '\" ' ) {
753+ nextRawChar()
754+ // offset += 3 // first part is positioned at the quote
754755 nextRawChar()
755756 stringPart(multiLine = true )
756757 }
757758 else {
759+ nextChar()
758760 token = STRINGLIT
759761 strVal = " "
760762 }
761763 }
762- else stringPart(multiLine = false )
764+ else {
765+ // offset += 1 // first part is positioned at the quote
766+ stringPart(multiLine = false )
767+ }
763768 }
764769 else {
765770 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