@@ -149,7 +149,7 @@ object Types {
149149
150150 /** Does this type denote a stable reference (i.e. singleton type)? */
151151 final def isStable (implicit ctx : Context ): Boolean = stripTypeVar match {
152- case tp : TermRef => tp.termSymbol .isStable && tp.prefix.isStable || tp.info.isStable
152+ case tp : TermRef => tp.symbol .isStable && tp.prefix.isStable || tp.info.isStable
153153 case _ : SingletonType | NoPrefix => true
154154 case tp : RefinedOrRecType => tp.parent.isStable
155155 case tp : ExprType => tp.resultType.isStable
@@ -4506,6 +4506,8 @@ object Types {
45064506 else if (lo `eq` hi) lo
45074507 else Range (lower(lo), upper(hi))
45084508
4509+ protected def emptyRange = range(defn.NothingType , defn.AnyType )
4510+
45094511 protected def isRange (tp : Type ): Boolean = tp.isInstanceOf [Range ]
45104512
45114513 protected def lower (tp : Type ): Type = tp match {
@@ -4630,7 +4632,7 @@ object Types {
46304632 else tp.derivedTypeBounds(lo, hi)
46314633
46324634 override protected def derivedSuperType (tp : SuperType , thistp : Type , supertp : Type ): Type =
4633- if (isRange(thistp) || isRange(supertp)) range(defn. NothingType , defn. AnyType )
4635+ if (isRange(thistp) || isRange(supertp)) emptyRange
46344636 else tp.derivedSuperType(thistp, supertp)
46354637
46364638 override protected def derivedAppliedType (tp : AppliedType , tycon : Type , args : List [Type ]): Type =
0 commit comments