Skip to content

Commit c66eb87

Browse files
committed
Don't forget braces around partial functions
When rewriting an indented list of cases to -noindent, put braces around them.
1 parent 338c504 commit c66eb87

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ object Parsers {
655655
}
656656

657657
def needsBraces(t: Any): Boolean = t match {
658+
case Match(EmptyTree, _) => true
658659
case Block(stats, expr) =>
659660
stats.nonEmpty || needsBraces(expr)
660661
case expr: Tree =>

0 commit comments

Comments
 (0)