Skip to content

Commit eb4d2c8

Browse files
Merge pull request scala#4477 from dotty-staging/elim-blocks-deeply
Eliminate nested blocks in functionAppliedTo
2 parents 80764e0 + ef57fea commit eb4d2c8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/src/dotty/tools/dotc/core/quoted/PickledQuotes.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,7 @@ object PickledQuotes {
152152
treeMap = tree => if (tree.symbol == paramSym) x1Ref().withPos(tree.pos) else tree
153153
).transform(ddef.rhs)
154154
case Block(stats, expr) =>
155-
val applied = rec(expr)
156-
if (stats.isEmpty) applied
157-
else Block(stats, applied)
155+
seq(stats, rec(expr))
158156
case Inlined(call, bindings, expansion) =>
159157
Inlined(call, bindings, rec(expansion))
160158
case _ =>

0 commit comments

Comments
 (0)