@@ -3373,6 +3373,8 @@ object Types {
33733373
33743374 // ------ ClassInfo, Type Bounds ------------------------------------------------------------
33753375
3376+ type TypeOrSymbol = AnyRef /* should be: Type | Symbol */
3377+
33763378 /** Roughly: the info of a class during a period.
33773379 * @param prefix The prefix on which parents, decls, and selfType need to be rebased.
33783380 * @param cls The class symbol.
@@ -3389,7 +3391,7 @@ object Types {
33893391 cls : ClassSymbol ,
33903392 classParents : List [Type ],
33913393 decls : Scope ,
3392- selfInfo : DotClass /* should be: Type | Symbol */ ) extends CachedGroundType with TypeType {
3394+ selfInfo : TypeOrSymbol ) extends CachedGroundType with TypeType {
33933395
33943396 private [this ] var selfTypeCache : Type = null
33953397 private [this ] var appliedRefCache : Type = null
@@ -3437,7 +3439,7 @@ object Types {
34373439 if (prefix eq this .prefix) this
34383440 else ClassInfo (prefix, cls, classParents, decls, selfInfo)
34393441
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 ) =
34413443 if ((prefix eq this .prefix) && (classParents eq this .classParents) && (decls eq this .decls) && (selfInfo eq this .selfInfo)) this
34423444 else ClassInfo (prefix, cls, classParents, decls, selfInfo)
34433445
@@ -3456,11 +3458,11 @@ object Types {
34563458 override def toString = s " ClassInfo( $prefix, $cls, $classParents) "
34573459 }
34583460
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 )
34603462 extends ClassInfo (prefix, cls, classParents, decls, selfInfo)
34613463
34623464 /** 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 )
34643466 extends CachedClassInfo (prefix, cls, Nil , decls, selfInfo) {
34653467
34663468 /** Install classinfo with known parents in `denot` s */
@@ -3475,7 +3477,7 @@ object Types {
34753477 }
34763478
34773479 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 ) =
34793481 unique(new CachedClassInfo (prefix, cls, classParents, decls, selfInfo))
34803482 }
34813483
0 commit comments