We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c57fd8 commit dff5adeCopy full SHA for dff5ade
compiler/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -3483,12 +3483,11 @@ object Parsers {
3483
val t = constrApp()
3484
val ts =
3485
if in.token == WITH then
3486
- val lookahead = in.LookaheadScanner(indent = true)
3487
- lookahead.nextToken()
3488
- if templateCanFollow && (lookahead.token == LBRACE || lookahead.token == INDENT) then
+ in.nextToken()
+ newLineOptWhenFollowedBy(LBRACE)
+ if templateCanFollow && (in.token == LBRACE || in.token == INDENT) then
3489
Nil
3490
else
3491
- in.nextToken()
3492
checkNotWithAtEOL()
3493
constrApps(commaOK, templateCanFollow)
3494
else if commaOK && in.token == COMMA then
0 commit comments