Skip to content

Commit dee06a5

Browse files
committed
Make changeOwnerAfter skip weak owners
changeOwner already does this.
1 parent 17b1995 commit dee06a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
629629
case tree: DefTree =>
630630
val sym = tree.symbol
631631
val prevDenot = sym.denot(ctx.withPhase(trans))
632-
if (prevDenot.owner == from) {
632+
if (prevDenot.effectiveOwner == from.skipWeakOwner) {
633633
val d = sym.copySymDenotation(owner = to)
634634
d.installAfter(trans)
635635
d.transformAfter(trans, d => if (d.owner eq from) d.copySymDenotation(owner = to) else d)

0 commit comments

Comments
 (0)