@@ -319,7 +319,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
319319 thirdTry
320320 case tp1 : TypeParamRef =>
321321 def flagNothingBound = {
322- if (! frozenConstraint && tp2.isRef(defn. NothingClass ) && state.isGlobalCommittable) {
322+ if (! frozenConstraint && tp2.isRef(NothingClass ) && state.isGlobalCommittable) {
323323 def msg = s " !!! instantiated to Nothing: $tp1, constraint = ${constraint.show}"
324324 if (Config .failOnInstantiationToNothing) assert(false , msg)
325325 else ctx.log(msg)
@@ -404,8 +404,9 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
404404 if (cls2.isClass) {
405405 if (cls2.typeParams.isEmpty) {
406406 if (cls2 eq AnyKindClass ) return true
407- if (tp1.isRef(defn. NothingClass )) return true
407+ if (tp1.isRef(NothingClass )) return true
408408 if (tp1.isLambdaSub) return false
409+ if (cls2 eq AnyClass ) return true
409410 // Note: We would like to replace this by `if (tp1.hasHigherKind)`
410411 // but right now we cannot since some parts of the standard library rely on the
411412 // idiom that e.g. `List <: Any`. We have to bootstrap without scalac first.
@@ -417,7 +418,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
417418 val base = tp1.baseType(cls2)
418419 if (base.typeSymbol == cls2) return true
419420 }
420- else if (tp1.isLambdaSub && ! tp1.isRef(defn. AnyKindClass ))
421+ else if (tp1.isLambdaSub && ! tp1.isRef(AnyKindClass ))
421422 return recur(tp1, EtaExpansion (cls2.typeRef))
422423 }
423424 fourthTry
@@ -1382,7 +1383,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
13821383 // at run time. It would not work to replace that with `Nothing`.
13831384 // However, maybe we can still apply the replacement to
13841385 // types which are not explicitly written.
1385- defn. NothingType
1386+ NothingType
13861387 case _ => andType(tp1, tp2)
13871388 }
13881389 case _ => andType(tp1, tp2)
@@ -1393,8 +1394,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
13931394 }
13941395
13951396 /** The greatest lower bound of a list types */
1396- final def glb (tps : List [Type ]): Type =
1397- ((defn.AnyType : Type ) /: tps)(glb)
1397+ final def glb (tps : List [Type ]): Type = ((AnyType : Type ) /: tps)(glb)
13981398
13991399 /** The least upper bound of two types
14001400 * @param canConstrain If true, new constraints might be added to simplify the lub.
@@ -1424,7 +1424,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
14241424
14251425 /** The least upper bound of a list of types */
14261426 final def lub (tps : List [Type ]): Type =
1427- ((defn. NothingType : Type ) /: tps)(lub(_,_, canConstrain = false ))
1427+ ((NothingType : Type ) /: tps)(lub(_,_, canConstrain = false ))
14281428
14291429 /** Try to produce joint arguments for a lub `A[T_1, ..., T_n] | A[T_1', ..., T_n']` using
14301430 * the following strategies:
0 commit comments