We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af31907 commit c9cad4aCopy full SHA for c9cad4a
compiler/src/dotty/tools/dotc/transform/MegaPhase.scala
@@ -296,8 +296,9 @@ class MegaPhase(val miniPhases: Array[MiniPhase]) extends Phase {
296
}
297
case tree: Block =>
298
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)
+ val stats = transformStats(tree.stats, ctx.owner, start)
+ val expr = transformTree(tree.expr, start)
301
+ goBlock(cpy.Block(tree)(stats, expr), start)
302
303
case tree: TypeApply =>
304
inContext(prepTypeApply(tree, start)(using outerCtx)) {
0 commit comments