@@ -149,7 +149,7 @@ object Types {
149
149
150
150
/** Does this type denote a stable reference (i.e. singleton type)? */
151
151
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
153
153
case _ : SingletonType | NoPrefix => true
154
154
case tp : RefinedOrRecType => tp.parent.isStable
155
155
case tp : ExprType => tp.resultType.isStable
@@ -4506,6 +4506,8 @@ object Types {
4506
4506
else if (lo `eq` hi) lo
4507
4507
else Range (lower(lo), upper(hi))
4508
4508
4509
+ protected def emptyRange = range(defn.NothingType , defn.AnyType )
4510
+
4509
4511
protected def isRange (tp : Type ): Boolean = tp.isInstanceOf [Range ]
4510
4512
4511
4513
protected def lower (tp : Type ): Type = tp match {
@@ -4630,7 +4632,7 @@ object Types {
4630
4632
else tp.derivedTypeBounds(lo, hi)
4631
4633
4632
4634
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
4634
4636
else tp.derivedSuperType(thistp, supertp)
4635
4637
4636
4638
override protected def derivedAppliedType (tp : AppliedType , tycon : Type , args : List [Type ]): Type =
0 commit comments