@@ -744,7 +744,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
744744    }
745745
746746    def  tryBaseType (cls2 : Symbol ) =  {
747-       val  allowBaseType  =  caseLambda.eq( NoType )  ||  (tp1 match  {
747+       val  allowBaseType  =  ! caseLambda.exists  ||  (tp1 match  {
748748        case  tp : TypeRef  if  tp.symbol.isClass =>  true 
749749        case  AppliedType (tycon : TypeRef , _) if  tycon.symbol.isClass =>  true 
750750        case  _ =>  false 
@@ -769,7 +769,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
769769                ||  narrowGADTBounds(tp1, tp2, approx, isUpper =  true ))
770770              &&  (tp2.isAny ||  GADTusage (tp1.symbol))
771771
772-             caseLambda.eq( NoType )  &&  isSubType(hi1, tp2, approx.addLow) ||  compareGADT ||  tryLiftedToThis1
772+             ! caseLambda.exists  &&  isSubType(hi1, tp2, approx.addLow) ||  compareGADT ||  tryLiftedToThis1
773773          case  _ => 
774774            //  `Mode.RelaxedOverriding` is only enabled when checking Java overriding
775775            //  in explicit nulls, and `Null` becomes a bottom type, which allows
@@ -2540,7 +2540,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
25402540    def  fullyInstantiated (tp : Type ):  Boolean  =  new  TypeAccumulator [Boolean ] {
25412541      override  def  apply (x : Boolean , t : Type ) = 
25422542        x &&  {
2543-           t match  {
2543+           t.dealias  match  {
25442544            case  tp : TypeRef  if  ! tp.symbol.isClass =>  false 
25452545            case  _ : SkolemType  |  _ : TypeVar  |  _ : TypeParamRef  =>  false 
25462546            case  _ =>  foldOver(x, t)
0 commit comments