@@ -3380,6 +3380,8 @@ object Types {
33803380
33813381 // ------ ClassInfo, Type Bounds ------------------------------------------------------------
33823382
3383+ type TypeOrSymbol = AnyRef /* should be: Type | Symbol */
3384+
33833385 /** Roughly: the info of a class during a period.
33843386 * @param prefix The prefix on which parents, decls, and selfType need to be rebased.
33853387 * @param cls The class symbol.
@@ -3396,7 +3398,7 @@ object Types {
33963398 cls : ClassSymbol ,
33973399 classParents : List [Type ],
33983400 decls : Scope ,
3399- selfInfo : DotClass /* should be: Type | Symbol */ ) extends CachedGroundType with TypeType {
3401+ selfInfo : TypeOrSymbol ) extends CachedGroundType with TypeType {
34003402
34013403 private [this ] var selfTypeCache : Type = null
34023404 private [this ] var appliedRefCache : Type = null
@@ -3444,7 +3446,7 @@ object Types {
34443446 if (prefix eq this .prefix) this
34453447 else ClassInfo (prefix, cls, classParents, decls, selfInfo)
34463448
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 ) =
34483450 if ((prefix eq this .prefix) && (classParents eq this .classParents) && (decls eq this .decls) && (selfInfo eq this .selfInfo)) this
34493451 else ClassInfo (prefix, cls, classParents, decls, selfInfo)
34503452
@@ -3463,11 +3465,11 @@ object Types {
34633465 override def toString = s " ClassInfo( $prefix, $cls, $classParents) "
34643466 }
34653467
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 )
34673469 extends ClassInfo (prefix, cls, classParents, decls, selfInfo)
34683470
34693471 /** 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 )
34713473 extends CachedClassInfo (prefix, cls, Nil , decls, selfInfo) {
34723474
34733475 /** Install classinfo with known parents in `denot` s */
@@ -3482,7 +3484,7 @@ object Types {
34823484 }
34833485
34843486 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 ) =
34863488 unique(new CachedClassInfo (prefix, cls, classParents, decls, selfInfo))
34873489 }
34883490
0 commit comments