Skip to content

Commit 17205d9

Browse files
committed
.
1 parent aa18b7e commit 17205d9

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
@@ -1376,7 +1376,10 @@ object Parsers {
13761376
val dedented = lines.dropRight(1).map { line =>
13771377
if (line.startsWith(closingIndent)) line.substring(closingIndent.length)
13781378
else if (line.trim.isEmpty) "" // Empty or whitespace-only lines
1379-
else ??? // should never happen
1379+
else assert(
1380+
false,
1381+
s"line \"$line\" in dedented string must be either empty or be further indented than the closing delimiter"
1382+
)
13801383
}
13811384

13821385
// Drop the first line if it's empty (the newline after opening delimiter)

0 commit comments

Comments
 (0)