Skip to content

Commit 7bbeb82

Browse files
committed
Refine Erasure#transform
JoinRefDenotations before erasure become UniqueRefDenotations after. The former are no longer legal after erasure.
1 parent 0d6191b commit 7bbeb82

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ class Erasure extends Phase with DenotTransformer {
8585
ref.copySymDenotation(symbol = newSymbol, owner = newOwner, initFlags = newFlags, info = newInfo)
8686
}
8787
}
88-
case ref =>
88+
case ref: JointRefDenotation =>
89+
new UniqueRefDenotation(
90+
ref.symbol, transformInfo(ref.symbol, ref.symbol.info), ref.validFor)
91+
case _ =>
8992
ref.derivedSingleDenotation(ref.symbol, transformInfo(ref.symbol, ref.symbol.info))
9093
}
9194

0 commit comments

Comments
 (0)