@@ -818,9 +818,10 @@ object Symbols {
818818 val oinfo = original.info match
819819 case ClassInfo (pre, _, parents, decls, selfInfo) =>
820820 assert(original.isClass)
821+ val parents1 = parents.mapConserve(ttmap.mapType)
821822 val otypeParams = original.typeParams
822823 if otypeParams.isEmpty then
823- ClassInfo (pre, copy.asClass, parents , decls.cloneScope, selfInfo)
824+ ClassInfo (pre, copy.asClass, parents1 , decls.cloneScope, selfInfo)
824825 else
825826 // copy type params, enter other definitions unchanged
826827 // type parameters need to be copied early, since other type
@@ -829,11 +830,11 @@ object Symbols {
829830 val newTypeParams = mapSymbols(original.typeParams, ttmap1, mapAlways = true )
830831 newTypeParams.foreach(decls1.enter)
831832 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))
833834 val selfInfo1 = selfInfo match
834835 case selfInfo : Type => selfInfo.substSym(otypeParams, newTypeParams)
835836 case _ => selfInfo
836- ClassInfo (pre, copy.asClass, parents1 , decls1, selfInfo1)
837+ ClassInfo (pre, copy.asClass, parents2 , decls1, selfInfo1)
837838 case oinfo => oinfo
838839
839840 denot.info = oinfo // needed as otherwise we won't be able to go from Sym -> parents & etc
0 commit comments