Skip to content

Commit de3dce6

Browse files
committed
Re-normalize parents methods
- get rid of withArgs variants - drop the NEW
1 parent e36bc58 commit de3dce6

24 files changed

+37
-85
lines changed

compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
889889
// to inner symbols of DefDef
890890
// todo: somehow handle.
891891

892-
def parents: List[Type] = tp.parentsNEW
892+
def parents: List[Type] = tp.parents
893893
}
894894

895895

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
213213
ta.assignType(untpd.TypeDef(sym.name, TypeTree(sym.info)), sym)
214214

215215
def ClassDef(cls: ClassSymbol, constr: DefDef, body: List[Tree], superArgs: List[Tree] = Nil)(implicit ctx: Context): TypeDef = {
216-
val firstParent :: otherParents = cls.info.parentsNEW
216+
val firstParent :: otherParents = cls.info.parents
217217
val superRef =
218218
if (cls is Trait) TypeTree(firstParent)
219219
else {
@@ -260,7 +260,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
260260
def AnonClass(parents: List[Type], fns: List[TermSymbol], methNames: List[TermName])(implicit ctx: Context): Block = {
261261
val owner = fns.head.owner
262262
val parents1 =
263-
if (parents.head.classSymbol.is(Trait)) parents.head.parentsNEW.head :: parents
263+
if (parents.head.classSymbol.is(Trait)) parents.head.parents.head :: parents
264264
else parents
265265
val cls = ctx.newNormalizedClassSymbol(owner, tpnme.ANON_FUN, Synthetic, parents1,
266266
coord = fns.map(_.pos).reduceLeft(_ union _))

compiler/src/dotty/tools/dotc/config/Config.scala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@ object Config {
8484
/** If this flag is set, take the fast path when comparing same-named type-aliases and types */
8585
final val fastPathForRefinedSubtype = true
8686

87-
/** If this flag is set, `TypeOps.normalizeToClassRefs` will insert forwarders
88-
* for type parameters of base classes. This is an optimization, which avoids
89-
* long alias chains. We should not rely on the optimization, though. So changing
90-
* the flag to false can be used for checking that everything works OK without it.
91-
*/
92-
final val forwardTypeParams = true
93-
9487
/** If this flag is set, and we compute `T1 { X = S1 }` & `T2 { X = S2 }` as a new
9588
* upper bound of a constrained parameter, try to align the refinements by computing
9689
* `S1 =:= S2` (which might instantiate type parameters).

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,14 +1366,8 @@ object SymDenotations {
13661366
super.info_=(tp)
13671367
}
13681368

1369-
/** The denotations of all parents in this class. */
1370-
def classParentsWithArgs(implicit ctx: Context): List[Type] = info match {
1371-
case classInfo: ClassInfo => classInfo.parentsWithArgs
1372-
case _ => Nil
1373-
}
1374-
13751369
def classParents(implicit ctx: Context): List[Type] = info match {
1376-
case classInfo: ClassInfo => classInfo.parentsNEW
1370+
case classInfo: ClassInfo => classInfo.parents
13771371
case _ => Nil
13781372
}
13791373

compiler/src/dotty/tools/dotc/core/TypeApplications.scala

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -491,14 +491,6 @@ class TypeApplications(val self: Type) extends AnyVal {
491491
final def baseArgInfos(base: Symbol)(implicit ctx: Context): List[Type] = // @!!! drop
492492
self.baseType(base).argInfos
493493

494-
/** The base type including all type arguments and applicable refinements
495-
* of this type. Refinements are applicable if they refine a member of
496-
* the parent type which furthermore is not a name-mangled type parameter.
497-
* Existential types in arguments are returned as TypeBounds instances.
498-
*/
499-
final def baseTypeWithArgs(base: Symbol)(implicit ctx: Context): Type = // @!!! drop
500-
self.baseType(base)
501-
502494
/** Translate a type of the form From[T] to To[T], keep other types as they are.
503495
* `from` and `to` must be static classes, both with one type parameter, and the same variance.
504496
* Do the same for by name types => From[T] and => To[T]

compiler/src/dotty/tools/dotc/core/TypeOps.scala

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,8 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
208208
case _ =>
209209
val commonBaseClasses = tp.mapReduceOr(_.baseClasses)(intersect)
210210
val doms = dominators(commonBaseClasses, Nil)
211-
def baseTp(cls: ClassSymbol): Type = {
212-
val base =
213-
if (tp1.typeParams.nonEmpty) tp.baseTypeTycon(cls)
214-
else tp.baseTypeWithArgs(cls)
215-
base.mapReduceOr(identity)(mergeRefinedOrApplied)
216-
}
211+
def baseTp(cls: ClassSymbol): Type =
212+
tp.baseType(cls).mapReduceOr(identity)(mergeRefinedOrApplied)
217213
doms.map(baseTp).reduceLeft(AndType.apply)
218214
}
219215
}
@@ -264,13 +260,6 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
264260
cls.enter(sym, decls)
265261
}
266262

267-
/** Normalize a list of parent types of class `cls` to make sure they are
268-
* all (possibly applied) references to classes.
269-
*/
270-
def normalizeToClassRefs(parents: List[Type], cls: ClassSymbol, decls: Scope): List[Type] = {
271-
parents.mapConserve(_.dealias) // !@@@ track and eliminate usages?
272-
}
273-
274263
/** An argument bounds violation is a triple consisting of
275264
* - the argument tree
276265
* - a string "upper" or "lower" indicating which bound is violated

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ object Types {
856856
}
857857

858858
/** Temporary replacement for baseTypeRef */
859-
final def baseTypeTycon(base: Symbol)(implicit ctx: Context): Type =
859+
final def baseTypeTycon(base: Symbol)(implicit ctx: Context): Type = // @!!! drop
860860
baseType(base).typeConstructor
861861

862862
def & (that: Type)(implicit ctx: Context): Type = track("&") {
@@ -1194,34 +1194,22 @@ object Types {
11941194
}
11951195

11961196
/** The full parent types, including all type arguments */
1197-
def parentsWithArgs(implicit ctx: Context): List[Type] = this match {
1198-
case tp: TypeProxy => tp.superType.parentsWithArgs
1199-
case _ => Nil
1200-
}
1201-
1202-
/** The full parent types, including (in new scheme) all type arguments */
1203-
def parentsNEW(implicit ctx: Context): List[Type] = this match {
1197+
def parents(implicit ctx: Context): List[Type] = this match {
12041198
case tp @ AppliedType(tycon, args) if tycon.typeSymbol.isClass =>
1205-
tycon.parentsNEW.map(_.subst(tycon.typeSymbol.typeParams, args))
1199+
tycon.parents.map(_.subst(tycon.typeSymbol.typeParams, args)) // !@@@ cache?
12061200
case tp: TypeRef =>
12071201
if (tp.info.isInstanceOf[TempClassInfo]) {
12081202
tp.reloadDenot()
12091203
assert(!tp.info.isInstanceOf[TempClassInfo])
12101204
}
1211-
tp.info.parentsNEW
1205+
tp.info.parents
12121206
case tp: TypeProxy =>
1213-
tp.superType.parentsNEW
1207+
tp.superType.parents
12141208
case _ => Nil
12151209
}
12161210

12171211
/** The first parent of this type, AnyRef if list of parents is empty */
1218-
def firstParentRef(implicit ctx: Context): TypeRef = parentsNEW match { // @!!! needed?
1219-
case p :: _ => p.typeConstructor.asInstanceOf[TypeRef]
1220-
case _ => defn.AnyType
1221-
}
1222-
1223-
/** The first parent of this type, AnyRef if list of parents is empty */
1224-
def firstParentNEW(implicit ctx: Context): Type = parentsNEW match {
1212+
def firstParent(implicit ctx: Context): Type = parents match {
12251213
case p :: _ => p
12261214
case _ => defn.AnyType
12271215
}
@@ -3613,10 +3601,7 @@ object Types {
36133601
// cached because baseType needs parents
36143602
private var parentsCache: List[Type] = null
36153603

3616-
/** The parent types with all type arguments */
3617-
override def parentsWithArgs(implicit ctx: Context): List[Type] = parentsNEW
3618-
3619-
override def parentsNEW(implicit ctx: Context): List[Type] = {
3604+
override def parents(implicit ctx: Context): List[Type] = {
36203605
if (parentsCache == null)
36213606
parentsCache = classParents.mapConserve(_.asSeenFrom(prefix, cls.owner))
36223607
parentsCache
@@ -4136,7 +4121,7 @@ object Types {
41364121
abstract class DeepTypeMap(implicit ctx: Context) extends TypeMap {
41374122
override def mapClassInfo(tp: ClassInfo) = {
41384123
val prefix1 = this(tp.prefix)
4139-
val parents1 = tp.parentsNEW mapConserve this
4124+
val parents1 = tp.parents mapConserve this
41404125
val selfInfo1 = tp.selfInfo match {
41414126
case selfInfo: Type => this(selfInfo)
41424127
case selfInfo => selfInfo

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
733733
if (sym.owner != thispre.cls) {
734734
val overriding = thispre.cls.info.decls.lookup(sym.name)
735735
if (overriding.exists && overriding != sym) {
736-
val base = pre.baseTypeWithArgs(sym.owner)
736+
val base = pre.baseType(sym.owner)
737737
assert(base.exists)
738738
pre = SuperType(thispre, base)
739739
}

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
322322
if (tp.variance == 1) " =+ "
323323
else if (tp.variance == -1) " =- "
324324
else " = "
325-
eql ~ toText(tp.alias)
325+
eql ~ toText(tp.alias)
326326
case tp @ TypeBounds(lo, hi) =>
327327
(if (lo isRef defn.NothingClass) Text() else " >: " ~ toText(lo)) ~
328328
(if (hi isRef defn.AnyClass) Text() else " <: " ~ toText(hi))
@@ -340,7 +340,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
340340
val declsText =
341341
if (trueDecls.isEmpty || !ctx.settings.debug.value) Text()
342342
else dclsText(trueDecls)
343-
tparamsText ~ " extends " ~ toTextParents(tp.parentsNEW) ~ "{" ~ selfText ~ declsText ~
343+
tparamsText ~ " extends " ~ toTextParents(tp.parents) ~ "{" ~ selfText ~ declsText ~
344344
"} at " ~ preText
345345
case tp =>
346346
": " ~ toTextGlobal(tp)
@@ -418,7 +418,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
418418

419419
def toText(sym: Symbol): Text =
420420
(kindString(sym) ~~ {
421-
if (sym.isAnonymousClass) toText(sym.info.parentsNEW, " with ") ~ "{...}"
421+
if (sym.isAnonymousClass) toText(sym.info.parents, " with ") ~ "{...}"
422422
else if (hasMeaninglessName(sym)) simpleNameString(sym.owner) + idString(sym)
423423
else nameString(sym)
424424
}).close

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
164164
case ErasedValueType(tycon, underlying) =>
165165
return "ErasedValueType(" ~ toText(tycon) ~ ", " ~ toText(underlying) ~ ")"
166166
case tp: ClassInfo =>
167-
return toTextParents(tp.parentsWithArgs) ~ "{...}"
167+
return toTextParents(tp.parents) ~ "{...}"
168168
case JavaArrayType(elemtp) =>
169169
return toText(elemtp) ~ "[]"
170170
case tp: AnnotatedType if homogenizedView =>

compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ object messages {
12731273
val msg = hl"""|$qual does not name a parent of $cls"""
12741274
val kind = "Reference"
12751275

1276-
private val parents: Seq[String] = (cls.info.parentsNEW map (_.typeSymbol.name.show)).sorted
1276+
private val parents: Seq[String] = (cls.info.parents map (_.typeSymbol.name.show)).sorted
12771277

12781278
val explanation =
12791279
hl"""|When a qualifier ${"T"} is used in a ${"super"} prefix of the form ${"C.super[T]"},

compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
236236
def linearizedAncestorTypes(info: ClassInfo): List[Type] = {
237237
val ref = info.fullyAppliedRef
238238
// Note that the ordering of classes in `baseClasses` is important.
239-
info.baseClasses.tail.map(ref.baseTypeWithArgs)
239+
info.baseClasses.tail.map(ref.baseType)
240240
}
241241

242242
def apiDefinitions(defs: List[Symbol]): List[api.Definition] = {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CrossCastAnd extends MiniPhaseTransform { thisTransform =>
2424
lazy val qtype = tree.qualifier.tpe.widen
2525
val sym = tree.symbol
2626
if (sym.is(Flags.Private) && qtype.typeSymbol != sym.owner)
27-
cpy.Select(tree)(tree.qualifier.asInstance(AndType(qtype.baseTypeWithArgs(sym.owner), tree.qualifier.tpe)), tree.name)
27+
cpy.Select(tree)(tree.qualifier.asInstance(AndType(qtype.baseType(sym.owner), tree.qualifier.tpe)), tree.name)
2828
else tree
2929
}
3030
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ object Erasure {
409409
cpy.Super(qual)(thisQual, untpd.Ident(sym.owner.asClass.name))
410410
.withType(SuperType(thisType, sym.owner.typeRef))
411411
else
412-
qual.withType(SuperType(thisType, thisType.firstParentRef))
412+
qual.withType(SuperType(thisType, thisType.firstParent.typeConstructor))
413413
case _ =>
414414
qual
415415
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ object ExplicitOuter {
213213
needsOuterIfReferenced(cls) &&
214214
(!hasLocalInstantiation(cls) || // needs outer because we might not know whether outer is referenced or not
215215
cls.mixins.exists(needsOuterIfReferenced) || // needs outer for parent traits
216-
cls.info.parentsNEW.exists(parent => // needs outer to potentially pass along to parent
216+
cls.info.parents.exists(parent => // needs outer to potentially pass along to parent
217217
needsOuterIfReferenced(parent.classSymbol.asClass)))
218218

219219
/** Class is always instantiated in the compilation unit where it is defined */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ trait FullParameterization {
163163
def rewireCall(thisArg: Tree): Tree = {
164164
val rewired = rewiredTarget(tree, derived)
165165
if (rewired.exists) {
166-
val base = thisArg.tpe.baseTypeWithArgs(origClass)
166+
val base = thisArg.tpe.baseType(origClass)
167167
assert(base.exists)
168168
ref(rewired.termRef)
169169
.appliedToTypeTrees(targs ++ base.argInfos.map(TypeTree(_)))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ object OverridingPairs {
3535
* pair has already been treated in a parent class.
3636
* This may be refined in subclasses. @see Bridges for a use case.
3737
*/
38-
protected def parents: Array[Symbol] = base.info.parentsNEW.toArray map (_.typeSymbol)
38+
protected def parents: Array[Symbol] = base.info.parents.toArray map (_.typeSymbol)
3939

4040
/** Does `sym1` match `sym2` so that it qualifies as overriding.
4141
* Types always match. Term symbols match if their membertypes

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@ class PatternMatcherOld extends MiniPhaseTransform with DenotTransformer {
13591359
// don't go looking for selectors if we only expect one pattern
13601360
def rawSubPatTypes = aligner.extractedTypes
13611361

1362-
def typeArgOfBaseTypeOr(tp: Type, baseClass: Symbol)(or: => Type): Type = (tp.baseTypeWithArgs(baseClass)).argInfos match {
1362+
def typeArgOfBaseTypeOr(tp: Type, baseClass: Symbol)(or: => Type): Type = (tp.baseType(baseClass)).argInfos match {
13631363
case x :: Nil => x
13641364
case _ => or
13651365
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete
254254

255255
val callTargs: List[tpd.Tree] =
256256
if (abstractOverClass) {
257-
val classTypeArgs = recv.tpe.baseTypeWithArgs(enclosingClass).argInfos
257+
val classTypeArgs = recv.tpe.baseType(enclosingClass).argInfos
258258
targs ::: classTypeArgs.map(x => ref(x.typeSymbol))
259259
} else targs
260260

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
915915
def isSubTypeOfParent(subtp: Type, tp: Type)(implicit ctx: Context): Boolean =
916916
if (subtp <:< tp) true
917917
else tp match {
918-
case tp: TypeRef if tp.symbol.isClass => isSubTypeOfParent(subtp, tp.firstParentNEW)
918+
case tp: TypeRef if tp.symbol.isClass => isSubTypeOfParent(subtp, tp.firstParent)
919919
case tp: TypeProxy => isSubTypeOfParent(subtp, tp.superType)
920920
case _ => false
921921
}

compiler/src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ object Checking {
456456
tp.derivedClassInfo(
457457
prefix = apply(tp.prefix),
458458
classParents =
459-
tp.parentsWithArgs.map { p =>
459+
tp.parents.map { p =>
460460
apply(p).stripAnnots match {
461461
case ref: RefType => ref
462462
case _ => defn.ObjectType // can happen if class files are missing

compiler/src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ object RefChecks {
287287
//Console.println(infoString(member) + " shadows1 " + infoString(other) " in " + clazz);//DEBUG
288288
return
289289
}
290-
val parentSymbols = clazz.info.parentsNEW.map(_.typeSymbol)
290+
val parentSymbols = clazz.info.parents.map(_.typeSymbol)
291291
if (parentSymbols exists (p => subOther(p) && subMember(p) && deferredCheck)) {
292292
//Console.println(infoString(member) + " shadows2 " + infoString(other) + " in " + clazz);//DEBUG
293293
return

compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ trait TypeAssigner {
4747
*/
4848
def classBound(info: ClassInfo)(implicit ctx: Context): Type = {
4949
val cls = info.cls
50-
val parentType = info.parentsWithArgs.reduceLeft(ctx.typeComparer.andType(_, _))
50+
val parentType = info.parents.reduceLeft(ctx.typeComparer.andType(_, _))
5151

5252
def addRefinement(parent: Type, decl: Symbol) = {
5353
val inherited =
@@ -308,7 +308,7 @@ trait TypeAssigner {
308308
case err: ErrorType => untpd.cpy.Super(tree)(qual, mix).withType(err)
309309
case qtype @ ThisType(_) =>
310310
val cls = qtype.cls
311-
def findMixinSuper(site: Type): Type = site.parentsNEW filter (_.typeSymbol.name == mix.name) match {
311+
def findMixinSuper(site: Type): Type = site.parents filter (_.typeSymbol.name == mix.name) match {
312312
case p :: Nil =>
313313
p.typeConstructor
314314
case Nil =>
@@ -319,9 +319,9 @@ trait TypeAssigner {
319319
val owntype =
320320
if (mixinClass.exists) mixinClass.appliedRef
321321
else if (!mix.isEmpty) findMixinSuper(cls.info)
322-
else if (inConstrCall || ctx.erasedTypes) cls.info.firstParentRef
322+
else if (inConstrCall || ctx.erasedTypes) cls.info.firstParent.typeConstructor
323323
else {
324-
val ps = cls.classInfo.parentsWithArgs
324+
val ps = cls.classInfo.parents
325325
if (ps.isEmpty) defn.AnyType else ps.reduceLeft((x: Type, y: Type) => x & y)
326326
}
327327
tree.withType(SuperType(cls.thisType, owntype))

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,9 +1468,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
14681468
case p :: _ if p.classSymbol.isRealClass => parents
14691469
case _ =>
14701470
val pcls = (defn.ObjectClass /: parents)(improve)
1471-
typr.println(i"ensure first is class $parents%, % --> ${parents map (_ baseTypeWithArgs pcls)}%, %")
1472-
val first = ctx.typeComparer.glb(
1473-
defn.ObjectType :: (parents map (_ baseTypeWithArgs pcls)))
1471+
typr.println(i"ensure first is class $parents%, % --> ${parents map (_ baseType pcls)}%, %")
1472+
val first = ctx.typeComparer.glb(defn.ObjectType :: parents.map(_.baseType(pcls)))
14741473
checkFeasibleParent(first, pos, em" in inferred superclass $first") :: parents
14751474
}
14761475
}

0 commit comments

Comments
 (0)