Skip to content

Commit d82f4c8

Browse files
committed
Fix '{}
1 parent f530c71 commit d82f4c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,8 @@ object Parsers {
917917
inDefScopeBraces {
918918
try
919919
block() match {
920-
case Block(Nil, expr) => expr
920+
case t @ Block(Nil, expr) =>
921+
if (expr.isEmpty) t else expr
921922
case t => t
922923
}
923924
finally in.inQuote = saved

0 commit comments

Comments
 (0)