Skip to content

Commit 21fa5dd

Browse files
committed
Merge pull request #291 from dotty-staging/fix-transform-bind
Fix Bind node contents not being transformed if phase didn't register transformBind.
2 parents 8088ef2 + 4954bd0 commit 21fa5dd

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
@@ -994,8 +994,8 @@ object TreeTransforms {
994994
implicit val mutatedInfo: TransformerInfo = mutateTransformers(info, prepForBind, info.nx.nxPrepBind, tree, cur)
995995
if (mutatedInfo eq null) tree
996996
else {
997-
val body = transform(tree.body, mutatedInfo, mutatedInfo.nx.nxTransBind(cur))
998-
goBind(cpy.Bind(tree)(tree.name, body), cur)
997+
val body = transform(tree.body, mutatedInfo, cur)
998+
goBind(cpy.Bind(tree)(tree.name, body), mutatedInfo.nx.nxTransBind(cur))
999999
}
10001000
case tree: ValDef if !tree.isEmpty => // As a result of discussing with Martin: emptyValDefs shouldn't be copied // NAME
10011001
implicit val mutatedInfo: TransformerInfo = mutateTransformers(info, prepForValDef, info.nx.nxPrepValDef, tree, cur)

0 commit comments

Comments
 (0)