Skip to content

Commit aa18b7e

Browse files
committed
.
1 parent c9fbf70 commit aa18b7e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,10 @@ object Parsers {
13651365
)
13661366

13671367
val closingIndent = str.substring(lastNewlineIdx + 1)
1368-
1368+
assert(
1369+
closingIndent.forall(_.isWhitespace),
1370+
"Last line of a dedented string literal must contain only whitespace followed by the closing delimiter"
1371+
)
13691372
// Split into lines
13701373
val lines = str.linesIterator.toSeq
13711374

0 commit comments

Comments
 (0)