@@ -818,9 +818,10 @@ object Symbols {
818
818
val oinfo = original.info match
819
819
case ClassInfo (pre, _, parents, decls, selfInfo) =>
820
820
assert(original.isClass)
821
+ val parents1 = parents.mapConserve(ttmap.mapType)
821
822
val otypeParams = original.typeParams
822
823
if otypeParams.isEmpty then
823
- ClassInfo (pre, copy.asClass, parents , decls.cloneScope, selfInfo)
824
+ ClassInfo (pre, copy.asClass, parents1 , decls.cloneScope, selfInfo)
824
825
else
825
826
// copy type params, enter other definitions unchanged
826
827
// type parameters need to be copied early, since other type
@@ -829,11 +830,11 @@ object Symbols {
829
830
val newTypeParams = mapSymbols(original.typeParams, ttmap1, mapAlways = true )
830
831
newTypeParams.foreach(decls1.enter)
831
832
for sym <- decls do if ! sym.is(TypeParam ) then decls1.enter(sym)
832
- val parents1 = parents .map(_.substSym(otypeParams, newTypeParams))
833
+ val parents2 = parents1 .map(_.substSym(otypeParams, newTypeParams))
833
834
val selfInfo1 = selfInfo match
834
835
case selfInfo : Type => selfInfo.substSym(otypeParams, newTypeParams)
835
836
case _ => selfInfo
836
- ClassInfo (pre, copy.asClass, parents1 , decls1, selfInfo1)
837
+ ClassInfo (pre, copy.asClass, parents2 , decls1, selfInfo1)
837
838
case oinfo => oinfo
838
839
839
840
denot.info = oinfo // needed as otherwise we won't be able to go from Sym -> parents & etc
0 commit comments