File tree 1 file changed +1
-5
lines changed
src/dotty/tools/dotc/core 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -2993,10 +2993,6 @@ object Types {
2993
2993
/** The class type with all type parameters */
2994
2994
def fullyAppliedRef (implicit ctx : Context ): Type = fullyAppliedRef(cls.typeRef, cls.typeParams)
2995
2995
2996
- def rebase (tp : Type )(implicit ctx : Context ): Type =
2997
- if ((prefix eq cls.owner.thisType) || ! cls.owner.isClass || ctx.erasedTypes) tp
2998
- else tp.substThis(cls.owner.asClass, prefix)
2999
-
3000
2996
private var typeRefCache : TypeRef = null
3001
2997
3002
2998
def typeRef (implicit ctx : Context ): TypeRef = {
@@ -3016,7 +3012,7 @@ object Types {
3016
3012
/** The parent type refs as seen from the given prefix */
3017
3013
override def parents (implicit ctx : Context ): List [TypeRef ] = {
3018
3014
if (parentsCache == null )
3019
- parentsCache = cls.classParents.mapConserve(rebase(_ ).asInstanceOf [TypeRef ])
3015
+ parentsCache = cls.classParents.mapConserve(_.asSeenFrom(prefix, cls.owner ).asInstanceOf [TypeRef ])
3020
3016
parentsCache
3021
3017
}
3022
3018
You can’t perform that action at this time.
0 commit comments