Skip to content

Commit a19c14a

Browse files
committed
Clarify region workaround
1 parent c8131c0 commit a19c14a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: compiler/src/dotty/tools/dotc/parsing/Parsers.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ object Parsers {
105105
private val InCase: Region => Region = Scanners.InCase(_)
106106
private val InCond: Region => Region = Scanners.InParens(LPAREN, _)
107107
private val InFor : Region => Region = Scanners.InBraces(_)
108-
private val InBrk : Region => Region =
108+
private val InOldCond: Region => Region = // old-style Cond to allow indent when InParens, see #22608
109109
case p: Scanners.InParens => Scanners.Indented(p.indentWidth, p.prefix, p)
110110
case r => r
111111

@@ -2328,7 +2328,7 @@ object Parsers {
23282328
def condExpr(altToken: Token): Tree =
23292329
val t: Tree =
23302330
if in.token == LPAREN then
2331-
inSepRegion(InBrk): // allow inferred NEWLINE for observeIndented below
2331+
inSepRegion(InOldCond): // allow inferred NEWLINE for observeIndented below
23322332
atSpan(in.offset):
23332333
makeTupleOrParens(inParensWithCommas(commaSeparated(exprInParens)))
23342334
.pipe: t =>

0 commit comments

Comments
 (0)