Skip to content

Commit 4797367

Browse files
committed
Fix '{}
1 parent 3ba9549 commit 4797367

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,8 @@ object Parsers {
925925
inDefScopeBraces {
926926
try
927927
block() match {
928-
case Block(Nil, expr) => expr
928+
case t @ Block(Nil, expr) =>
929+
if (expr.isEmpty) t else expr
929930
case t => t
930931
}
931932
finally in.inQuote = saved

0 commit comments

Comments
 (0)