@@ -3373,6 +3373,8 @@ object Types {
3373
3373
3374
3374
// ------ ClassInfo, Type Bounds ------------------------------------------------------------
3375
3375
3376
+ type TypeOrSymbol = AnyRef /* should be: Type | Symbol */
3377
+
3376
3378
/** Roughly: the info of a class during a period.
3377
3379
* @param prefix The prefix on which parents, decls, and selfType need to be rebased.
3378
3380
* @param cls The class symbol.
@@ -3389,7 +3391,7 @@ object Types {
3389
3391
cls : ClassSymbol ,
3390
3392
classParents : List [Type ],
3391
3393
decls : Scope ,
3392
- selfInfo : DotClass /* should be: Type | Symbol */ ) extends CachedGroundType with TypeType {
3394
+ selfInfo : TypeOrSymbol ) extends CachedGroundType with TypeType {
3393
3395
3394
3396
private [this ] var selfTypeCache : Type = null
3395
3397
private [this ] var appliedRefCache : Type = null
@@ -3437,7 +3439,7 @@ object Types {
3437
3439
if (prefix eq this .prefix) this
3438
3440
else ClassInfo (prefix, cls, classParents, decls, selfInfo)
3439
3441
3440
- def derivedClassInfo (prefix : Type = this .prefix, classParents : List [Type ] = this .classParents, decls : Scope = this .decls, selfInfo : DotClass = this .selfInfo)(implicit ctx : Context ) =
3442
+ def derivedClassInfo (prefix : Type = this .prefix, classParents : List [Type ] = this .classParents, decls : Scope = this .decls, selfInfo : TypeOrSymbol = this .selfInfo)(implicit ctx : Context ) =
3441
3443
if ((prefix eq this .prefix) && (classParents eq this .classParents) && (decls eq this .decls) && (selfInfo eq this .selfInfo)) this
3442
3444
else ClassInfo (prefix, cls, classParents, decls, selfInfo)
3443
3445
@@ -3456,11 +3458,11 @@ object Types {
3456
3458
override def toString = s " ClassInfo( $prefix, $cls, $classParents) "
3457
3459
}
3458
3460
3459
- class CachedClassInfo (prefix : Type , cls : ClassSymbol , classParents : List [Type ], decls : Scope , selfInfo : DotClass )
3461
+ class CachedClassInfo (prefix : Type , cls : ClassSymbol , classParents : List [Type ], decls : Scope , selfInfo : TypeOrSymbol )
3460
3462
extends ClassInfo (prefix, cls, classParents, decls, selfInfo)
3461
3463
3462
3464
/** A class for temporary class infos where `parents` are not yet known */
3463
- final class TempClassInfo (prefix : Type , cls : ClassSymbol , decls : Scope , selfInfo : DotClass )
3465
+ final class TempClassInfo (prefix : Type , cls : ClassSymbol , decls : Scope , selfInfo : TypeOrSymbol )
3464
3466
extends CachedClassInfo (prefix, cls, Nil , decls, selfInfo) {
3465
3467
3466
3468
/** Install classinfo with known parents in `denot` s */
@@ -3475,7 +3477,7 @@ object Types {
3475
3477
}
3476
3478
3477
3479
object ClassInfo {
3478
- def apply (prefix : Type , cls : ClassSymbol , classParents : List [Type ], decls : Scope , selfInfo : DotClass = NoType )(implicit ctx : Context ) =
3480
+ def apply (prefix : Type , cls : ClassSymbol , classParents : List [Type ], decls : Scope , selfInfo : TypeOrSymbol = NoType )(implicit ctx : Context ) =
3479
3481
unique(new CachedClassInfo (prefix, cls, classParents, decls, selfInfo))
3480
3482
}
3481
3483
0 commit comments