@@ -302,7 +302,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
302302 thirdTry
303303 case tp1 : TypeParamRef =>
304304 def flagNothingBound = {
305- if (! frozenConstraint && tp2.isRef(defn. NothingClass ) && state.isGlobalCommittable) {
305+ if (! frozenConstraint && tp2.isRef(NothingClass ) && state.isGlobalCommittable) {
306306 def msg = s " !!! instantiated to Nothing: $tp1, constraint = ${constraint.show}"
307307 if (Config .failOnInstantiationToNothing) assert(false , msg)
308308 else ctx.log(msg)
@@ -384,8 +384,9 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
384384 if (cls2.isClass) {
385385 if (cls2.typeParams.isEmpty) {
386386 if (cls2 eq AnyKindClass ) return true
387- if (tp1.isRef(defn. NothingClass )) return true
387+ if (tp1.isRef(NothingClass )) return true
388388 if (tp1.isLambdaSub) return false
389+ if (cls2 eq AnyClass ) return true
389390 // Note: We would like to replace this by `if (tp1.hasHigherKind)`
390391 // but right now we cannot since some parts of the standard library rely on the
391392 // idiom that e.g. `List <: Any`. We have to bootstrap without scalac first.
@@ -399,7 +400,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
399400 val base = tp1.baseType(cls2)
400401 if (base.typeSymbol == cls2) return true
401402 }
402- else if (tp1.isLambdaSub && ! tp1.isRef(defn. AnyKindClass ))
403+ else if (tp1.isLambdaSub && ! tp1.isRef(AnyKindClass ))
403404 return recur(tp1, EtaExpansion (cls2.typeRef))
404405 }
405406 fourthTry
@@ -1296,7 +1297,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
12961297 // at run time. It would not work to replace that with `Nothing`.
12971298 // However, maybe we can still apply the replacement to
12981299 // types which are not explicitly written.
1299- defn. NothingType
1300+ NothingType
13001301 case _ => andType(tp1, tp2)
13011302 }
13021303 case _ => andType(tp1, tp2)
@@ -1307,8 +1308,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
13071308 }
13081309
13091310 /** The greatest lower bound of a list types */
1310- final def glb (tps : List [Type ]): Type =
1311- ((defn.AnyType : Type ) /: tps)(glb)
1311+ final def glb (tps : List [Type ]): Type = ((AnyType : Type ) /: tps)(glb)
13121312
13131313 /** The least upper bound of two types
13141314 * @param canConstrain If true, new constraints might be added to simplify the lub.
@@ -1338,7 +1338,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
13381338
13391339 /** The least upper bound of a list of types */
13401340 final def lub (tps : List [Type ]): Type =
1341- ((defn. NothingType : Type ) /: tps)(lub(_,_, canConstrain = false ))
1341+ ((NothingType : Type ) /: tps)(lub(_,_, canConstrain = false ))
13421342
13431343 /** Try to produce joint arguments for a lub `A[T_1, ..., T_n] | A[T_1', ..., T_n']` using
13441344 * the following strategies:
0 commit comments