@@ -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
0 commit comments