Skip to content

Commit bb8eb47

Browse files
som-snytttgodzik
authored andcommitted
Clarify region workaround
[Cherry-picked a19c14a]
1 parent 1e9068e commit bb8eb47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ object Parsers {
9797
private val InCase: Region => Region = Scanners.InCase(_)
9898
private val InCond: Region => Region = Scanners.InParens(LPAREN, _)
9999
private val InFor : Region => Region = Scanners.InBraces(_)
100-
private val InBrk : Region => Region =
100+
private val InOldCond: Region => Region = // old-style Cond to allow indent when InParens, see #22608
101101
case p: Scanners.InParens => Scanners.Indented(p.indentWidth, p.prefix, p)
102102
case r => r
103103

@@ -2132,7 +2132,7 @@ object Parsers {
21322132
def condExpr(altToken: Token): Tree =
21332133
val t: Tree =
21342134
if in.token == LPAREN then
2135-
inSepRegion(InBrk): // allow inferred NEWLINE for observeIndented below
2135+
inSepRegion(InOldCond): // allow inferred NEWLINE for observeIndented below
21362136
atSpan(in.offset):
21372137
makeTupleOrParens(inParensWithCommas(commaSeparated(exprInParens)))
21382138
.pipe: t =>

0 commit comments

Comments
 (0)