Skip to content

Commit 5a36e2f

Browse files
committed
ChangeOwnerAfter should also change owners of denotations defined later.
1 parent 2cbf29e commit 5a36e2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
642642
case tree: DefTree =>
643643
val sym = tree.symbol
644644
val prevDenot = sym.denot(ctx.withPhase(trans))
645-
if (prevDenot.validFor.containsPhaseId(trans.id) && prevDenot.owner == from) {
645+
if (prevDenot.owner == from) {
646646
val d = sym.copySymDenotation(owner = to)
647647
d.installAfter(trans)
648648
d.transformAfter(trans, d => if (d.owner eq from) d.copySymDenotation(owner = to) else d)

0 commit comments

Comments
 (0)