File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -641,7 +641,8 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
641
641
def traverse (tree : Tree )(implicit ctx : Context ) = tree match {
642
642
case tree : DefTree =>
643
643
val sym = tree.symbol
644
- if (sym.denot(ctx.withPhase(trans)).owner == from) {
644
+ val prevDenot = sym.denot(ctx.withPhase(trans))
645
+ if (prevDenot.validFor.containsPhaseId(trans.id) && prevDenot.owner == from) {
645
646
val d = sym.copySymDenotation(owner = to)
646
647
d.installAfter(trans)
647
648
d.transformAfter(trans, d => if (d.owner eq from) d.copySymDenotation(owner = to) else d)
@@ -651,7 +652,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
651
652
traverseChildren(tree)
652
653
}
653
654
}
654
- traverser.traverse(tree)
655
+ traverser.traverse(tree)(ctx.withMode( Mode . FutureDefsOK ))
655
656
tree
656
657
}
657
658
You can’t perform that action at this time.
0 commit comments