File tree Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1010,7 +1010,7 @@ object Types {
1010
1010
1011
1011
/** The full parent types, including all type arguments */
1012
1012
def parentsWithArgs (implicit ctx : Context ): List [Type ] = this match {
1013
- case tp : TypeProxy => tp.underlying.parents
1013
+ case tp : TypeProxy => tp.underlying.parentsWithArgs
1014
1014
case _ => List ()
1015
1015
}
1016
1016
@@ -2771,11 +2771,8 @@ object Types {
2771
2771
parentsCache
2772
2772
}
2773
2773
2774
- override def parentsWithArgs (implicit ctx : Context ): List [Type ] =
2775
- parents.map(p => typeRef.baseTypeWithArgs(p.symbol))
2776
-
2777
2774
/** The parent types with all type arguments */
2778
- def instantiatedParents (implicit ctx : Context ): List [Type ] =
2775
+ override def parentsWithArgs (implicit ctx : Context ): List [Type ] =
2779
2776
parents mapConserve { pref =>
2780
2777
((pref : Type ) /: pref.classSymbol.typeParams) { (parent, tparam) =>
2781
2778
val targSym = decls.lookup(tparam.name)
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
160
160
case ErasedValueType (clazz, underlying) =>
161
161
return " ErasedValueType(" ~ toText(clazz.typeRef) ~ " , " ~ toText(underlying) ~ " )"
162
162
case tp : ClassInfo =>
163
- return toTextParents(tp.instantiatedParents ) ~ " {...}"
163
+ return toTextParents(tp.parentsWithArgs ) ~ " {...}"
164
164
case JavaArrayType (elemtp) =>
165
165
return toText(elemtp) ~ " []"
166
166
case tp : SelectionProto =>
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ object Checking {
326
326
else errors1
327
327
} else errors1
328
328
case tp : ClassInfo =>
329
- (apply(errors, tp.prefix) /: tp.typeRef. parentsWithArgs)(apply)
329
+ (apply(errors, tp.prefix) /: tp.parentsWithArgs)(apply)
330
330
case _ =>
331
331
foldOver(errors, tp)
332
332
}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ trait TypeAssigner {
64
64
if (tp1.typeSymbol.exists)
65
65
return tp1
66
66
}
67
- val parentType = info.instantiatedParents .reduceLeft(ctx.typeComparer.andType(_, _))
67
+ val parentType = info.parentsWithArgs .reduceLeft(ctx.typeComparer.andType(_, _))
68
68
def addRefinement (parent : Type , decl : Symbol ) = {
69
69
val inherited =
70
70
parentType.findMember(decl.name, info.cls.thisType, Private )
@@ -282,7 +282,7 @@ trait TypeAssigner {
282
282
else if (! mix.isEmpty) findMixinSuper(cls.info)
283
283
else if (inConstrCall || ctx.erasedTypes) cls.info.firstParent
284
284
else {
285
- val ps = cls.classInfo.instantiatedParents
285
+ val ps = cls.classInfo.parentsWithArgs
286
286
if (ps.isEmpty) defn.AnyType else ps.reduceLeft((x : Type , y : Type ) => x & y)
287
287
}
288
288
tree.withType(SuperType (cls.thisType, owntype))
You can’t perform that action at this time.
0 commit comments