Skip to content

Commit c9cad4a

Browse files
committed
Revert change in MegaPhase
1 parent af31907 commit c9cad4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/transform/MegaPhase.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,9 @@ class MegaPhase(val miniPhases: Array[MiniPhase]) extends Phase {
296296
}
297297
case tree: Block =>
298298
inContext(prepBlock(tree, start)(using outerCtx)) {
299-
val stats1 = transformStats(tree.stats :+ tree.expr, ctx.owner, start)
300-
goBlock(cpy.Block(tree)(stats1.init, stats1.last), start)
299+
val stats = transformStats(tree.stats, ctx.owner, start)
300+
val expr = transformTree(tree.expr, start)
301+
goBlock(cpy.Block(tree)(stats, expr), start)
301302
}
302303
case tree: TypeApply =>
303304
inContext(prepTypeApply(tree, start)(using outerCtx)) {

0 commit comments

Comments
 (0)