We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e2221d commit 4c5988fCopy full SHA for 4c5988f
compiler/src/dotty/tools/dotc/transform/ElimOpaque.scala
@@ -36,7 +36,11 @@ class ElimOpaque extends MiniPhase with DenotTransformer {
36
info = TypeAlias(ref.opaqueAlias),
37
initFlags = ref.flags &~ (Opaque | Deferred))
38
case ref: SymDenotation if sym.isOpaqueCompanion =>
39
- val ref1 = ref.copySymDenotation(initFlags = ref.flags &~ Opaque)
+ val cinfo = sym.asClass.classInfo
40
+ val RefinedType(sourceRef, _, _) = cinfo.selfInfo
41
+ val ref1 = ref.copySymDenotation(
42
+ info = cinfo.derivedClassInfo(selfInfo = sourceRef),
43
+ initFlags = ref.flags &~ Opaque)
44
ref1.registeredCompanion = NoSymbol
45
ref1
46
case _ if sym.isOpaqueHelper =>
0 commit comments