@@ -470,10 +470,8 @@ object Types {
470
470
final def memberExcluding (name : Name , excluding : FlagSet )(implicit ctx : Context ): Denotation = {
471
471
// We need a valid prefix for `asSeenFrom`
472
472
val pre = this match {
473
- case tp : ClassInfo =>
474
- tp.typeRef // @!!! appliedRef
475
- case _ =>
476
- widenIfUnstable
473
+ case tp : ClassInfo => tp.appliedRef
474
+ case _ => widenIfUnstable
477
475
}
478
476
findMember(name, pre, excluding)
479
477
}
@@ -3432,48 +3430,25 @@ object Types {
3432
3430
decls : Scope ,
3433
3431
selfInfo : DotClass /* should be: Type | Symbol */ ) extends CachedGroundType with TypeType {
3434
3432
3433
+ private var selfTypeCache : Type = null
3434
+ private var appliedRefCache : Type = null
3435
+
3435
3436
/** The self type of a class is the conjunction of
3436
3437
* - the explicit self type if given (or the info of a given self symbol), and
3437
3438
* - the fully applied reference to the class itself.
3438
3439
*/
3439
3440
def selfType (implicit ctx : Context ): Type = {
3440
3441
if (selfTypeCache == null )
3441
3442
selfTypeCache = {
3442
- def fullRef = fullyAppliedRef
3443
3443
val given = cls.givenSelfType
3444
- val raw =
3445
- if (! given .exists) fullRef
3446
- else if (cls is Module ) given
3447
- else if (ctx.erasedTypes) fullRef
3448
- else AndType (given , fullRef)
3449
- raw// .asSeenFrom(prefix, cls.owner)
3444
+ if (! given .exists) appliedRef
3445
+ else if (cls is Module ) given
3446
+ else if (ctx.erasedTypes) appliedRef
3447
+ else AndType (given , appliedRef)
3450
3448
}
3451
3449
selfTypeCache
3452
3450
}
3453
3451
3454
- private var selfTypeCache : Type = null
3455
-
3456
- // private def fullyAppliedRef(base: Type, tparams: List[TypeSymbol])(implicit ctx: Context): Type =
3457
- // base.appliedTo(tparams.map(_.typeRef))
3458
-
3459
- /** The class type with all type parameters */
3460
- def fullyAppliedRef (implicit ctx : Context ): Type = // @!!! eliminate
3461
- // if (true)
3462
- cls.appliedRef
3463
- // else fullyAppliedRef(cls.typeRef, cls.typeParams)
3464
-
3465
- private var appliedRefCache : Type = null
3466
- private var typeRefCache : TypeRef = null
3467
-
3468
- def typeRef (implicit ctx : Context ): TypeRef = {
3469
- def clsDenot = if (prefix eq cls.owner.thisType) cls.denot else cls.denot.copySymDenotation(info = this )
3470
- if (typeRefCache == null )
3471
- typeRefCache =
3472
- if ((cls is PackageClass ) || cls.owner.isTerm) symbolicTypeRef
3473
- else TypeRef (prefix, cls.name, clsDenot)
3474
- typeRefCache
3475
- }
3476
-
3477
3452
def appliedRef (implicit ctx : Context ): Type = {
3478
3453
def clsDenot = if (prefix eq cls.owner.thisType) cls.denot else cls.denot.copySymDenotation(info = this )
3479
3454
if (appliedRefCache == null ) {
0 commit comments