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 @@ -1016,7 +1016,7 @@ object Types {
1016
1016
1017
1017
/** The full parent types, including all type arguments */
1018
1018
def parentsWithArgs (implicit ctx : Context ): List [Type ] = this match {
1019
- case tp : TypeProxy => tp.underlying.parents
1019
+ case tp : TypeProxy => tp.underlying.parentsWithArgs
1020
1020
case _ => List ()
1021
1021
}
1022
1022
@@ -2786,11 +2786,8 @@ object Types {
2786
2786
parentsCache
2787
2787
}
2788
2788
2789
- override def parentsWithArgs (implicit ctx : Context ): List [Type ] =
2790
- parents.map(p => typeRef.baseTypeWithArgs(p.symbol))
2791
-
2792
2789
/** The parent types with all type arguments */
2793
- def instantiatedParents (implicit ctx : Context ): List [Type ] =
2790
+ override def parentsWithArgs (implicit ctx : Context ): List [Type ] =
2794
2791
parents mapConserve { pref =>
2795
2792
((pref : Type ) /: pref.classSymbol.typeParams) { (parent, tparam) =>
2796
2793
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 @@ -342,7 +342,7 @@ object Checking {
342
342
else errors1
343
343
} else errors1
344
344
case tp : ClassInfo =>
345
- (apply(errors, tp.prefix) /: tp.typeRef. parentsWithArgs)(apply)
345
+ (apply(errors, tp.prefix) /: tp.parentsWithArgs)(apply)
346
346
case _ =>
347
347
foldOver(errors, tp)
348
348
}
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ trait TypeAssigner {
69
69
if (tp1.typeSymbol.exists)
70
70
return tp1
71
71
}
72
- val parentType = info.instantiatedParents .reduceLeft(ctx.typeComparer.andType(_, _))
72
+ val parentType = info.parentsWithArgs .reduceLeft(ctx.typeComparer.andType(_, _))
73
73
def addRefinement (parent : Type , decl : Symbol ) = {
74
74
val inherited =
75
75
parentType.findMember(decl.name, info.cls.thisType, Private )
@@ -287,7 +287,7 @@ trait TypeAssigner {
287
287
else if (! mix.isEmpty) findMixinSuper(cls.info)
288
288
else if (inConstrCall || ctx.erasedTypes) cls.info.firstParent
289
289
else {
290
- val ps = cls.classInfo.instantiatedParents
290
+ val ps = cls.classInfo.parentsWithArgs
291
291
if (ps.isEmpty) defn.AnyType else ps.reduceLeft((x : Type , y : Type ) => x & y)
292
292
}
293
293
tree.withType(SuperType (cls.thisType, owntype))
You can’t perform that action at this time.
0 commit comments