Skip to content

Commit 9ec3a4f

Browse files
committed
prepareStats should span all statement transforms
Statements are now transformed with the transform returned by prepareStats, analogoys to the other prepare methods.
1 parent 19b6a04 commit 9ec3a4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dotty/tools/dotc/transform/TreeTransform.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,9 +1174,9 @@ object TreeTransforms {
11741174
val newInfo = mutateTransformers(info, prepForStats, info.nx.nxPrepStats, trees, current)
11751175
val exprCtx = ctx.withOwner(exprOwner)
11761176
def transformStat(stat: Tree): Tree = stat match {
1177-
case _: Import | _: DefTree => transform(stat, info, current)
1177+
case _: Import | _: DefTree => transform(stat, newInfo, current)
11781178
case Thicket(stats) => cpy.Thicket(stat, stats mapConserve transformStat)
1179-
case _ => transform(stat, info, current)(exprCtx)
1179+
case _ => transform(stat, newInfo, current)(exprCtx)
11801180
}
11811181
val newTrees = flatten(trees.mapconserve(transformStat))
11821182
goStats(newTrees, newInfo.nx.nxTransStats(current))(ctx, newInfo)

0 commit comments

Comments
 (0)