@@ -297,7 +297,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
297297 thirdTry
298298 case tp1 : TypeParamRef =>
299299 def flagNothingBound = {
300- if (! frozenConstraint && tp2.isRef(defn. NothingClass ) && state.isGlobalCommittable) {
300+ if (! frozenConstraint && tp2.isRef(NothingClass ) && state.isGlobalCommittable) {
301301 def msg = s " !!! instantiated to Nothing: $tp1, constraint = ${constraint.show}"
302302 if (Config .failOnInstantiationToNothing) assert(false , msg)
303303 else ctx.log(msg)
@@ -379,8 +379,9 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
379379 if (cls2.isClass) {
380380 if (cls2.typeParams.isEmpty) {
381381 if (cls2 eq AnyKindClass ) return true
382- if (tp1.isRef(defn. NothingClass )) return true
382+ if (tp1.isRef(NothingClass )) return true
383383 if (tp1.isLambdaSub) return false
384+ if (cls2 eq AnyClass ) return true
384385 // Note: We would like to replace this by `if (tp1.hasHigherKind)`
385386 // but right now we cannot since some parts of the standard library rely on the
386387 // idiom that e.g. `List <: Any`. We have to bootstrap without scalac first.
@@ -394,7 +395,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
394395 val base = tp1.baseType(cls2)
395396 if (base.typeSymbol == cls2) return true
396397 }
397- else if (tp1.isLambdaSub && ! tp1.isRef(defn. AnyKindClass ))
398+ else if (tp1.isLambdaSub && ! tp1.isRef(AnyKindClass ))
398399 return recur(tp1, EtaExpansion (cls2.typeRef))
399400 }
400401 fourthTry
@@ -1257,7 +1258,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
12571258 // at run time. It would not work to replace that with `Nothing`.
12581259 // However, maybe we can still apply the replacement to
12591260 // types which are not explicitly written.
1260- defn. NothingType
1261+ NothingType
12611262 case _ => andType(tp1, tp2)
12621263 }
12631264 case _ => andType(tp1, tp2)
@@ -1268,8 +1269,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
12681269 }
12691270
12701271 /** The greatest lower bound of a list types */
1271- final def glb (tps : List [Type ]): Type =
1272- ((defn.AnyType : Type ) /: tps)(glb)
1272+ final def glb (tps : List [Type ]): Type = ((AnyType : Type ) /: tps)(glb)
12731273
12741274 /** The least upper bound of two types
12751275 * @param canConstrain If true, new constraints might be added to simplify the lub.
@@ -1299,7 +1299,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
12991299
13001300 /** The least upper bound of a list of types */
13011301 final def lub (tps : List [Type ]): Type =
1302- ((defn. NothingType : Type ) /: tps)(lub(_,_, canConstrain = false ))
1302+ ((NothingType : Type ) /: tps)(lub(_,_, canConstrain = false ))
13031303
13041304 /** Try to produce joint arguments for a lub `A[T_1, ..., T_n] | A[T_1', ..., T_n']` using
13051305 * the following strategies:
0 commit comments