@@ -3380,6 +3380,8 @@ object Types {
3380
3380
3381
3381
// ------ ClassInfo, Type Bounds ------------------------------------------------------------
3382
3382
3383
+ type TypeOrSymbol = AnyRef /* should be: Type | Symbol */
3384
+
3383
3385
/** Roughly: the info of a class during a period.
3384
3386
* @param prefix The prefix on which parents, decls, and selfType need to be rebased.
3385
3387
* @param cls The class symbol.
@@ -3396,7 +3398,7 @@ object Types {
3396
3398
cls : ClassSymbol ,
3397
3399
classParents : List [Type ],
3398
3400
decls : Scope ,
3399
- selfInfo : DotClass /* should be: Type | Symbol */ ) extends CachedGroundType with TypeType {
3401
+ selfInfo : TypeOrSymbol ) extends CachedGroundType with TypeType {
3400
3402
3401
3403
private [this ] var selfTypeCache : Type = null
3402
3404
private [this ] var appliedRefCache : Type = null
@@ -3444,7 +3446,7 @@ object Types {
3444
3446
if (prefix eq this .prefix) this
3445
3447
else ClassInfo (prefix, cls, classParents, decls, selfInfo)
3446
3448
3447
- def derivedClassInfo (prefix : Type = this .prefix, classParents : List [Type ] = this .classParents, decls : Scope = this .decls, selfInfo : DotClass = this .selfInfo)(implicit ctx : Context ) =
3449
+ def derivedClassInfo (prefix : Type = this .prefix, classParents : List [Type ] = this .classParents, decls : Scope = this .decls, selfInfo : TypeOrSymbol = this .selfInfo)(implicit ctx : Context ) =
3448
3450
if ((prefix eq this .prefix) && (classParents eq this .classParents) && (decls eq this .decls) && (selfInfo eq this .selfInfo)) this
3449
3451
else ClassInfo (prefix, cls, classParents, decls, selfInfo)
3450
3452
@@ -3463,11 +3465,11 @@ object Types {
3463
3465
override def toString = s " ClassInfo( $prefix, $cls, $classParents) "
3464
3466
}
3465
3467
3466
- class CachedClassInfo (prefix : Type , cls : ClassSymbol , classParents : List [Type ], decls : Scope , selfInfo : DotClass )
3468
+ class CachedClassInfo (prefix : Type , cls : ClassSymbol , classParents : List [Type ], decls : Scope , selfInfo : TypeOrSymbol )
3467
3469
extends ClassInfo (prefix, cls, classParents, decls, selfInfo)
3468
3470
3469
3471
/** A class for temporary class infos where `parents` are not yet known */
3470
- final class TempClassInfo (prefix : Type , cls : ClassSymbol , decls : Scope , selfInfo : DotClass )
3472
+ final class TempClassInfo (prefix : Type , cls : ClassSymbol , decls : Scope , selfInfo : TypeOrSymbol )
3471
3473
extends CachedClassInfo (prefix, cls, Nil , decls, selfInfo) {
3472
3474
3473
3475
/** Install classinfo with known parents in `denot` s */
@@ -3482,7 +3484,7 @@ object Types {
3482
3484
}
3483
3485
3484
3486
object ClassInfo {
3485
- def apply (prefix : Type , cls : ClassSymbol , classParents : List [Type ], decls : Scope , selfInfo : DotClass = NoType )(implicit ctx : Context ) =
3487
+ def apply (prefix : Type , cls : ClassSymbol , classParents : List [Type ], decls : Scope , selfInfo : TypeOrSymbol = NoType )(implicit ctx : Context ) =
3486
3488
unique(new CachedClassInfo (prefix, cls, classParents, decls, selfInfo))
3487
3489
}
3488
3490
0 commit comments