@@ -325,7 +325,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
325
325
true
326
326
}
327
327
def compareTypeParamRef =
328
- ctx.mode.is( Mode . TypevarsMissContext ) ||
328
+ assumedTrue(tp1 ) ||
329
329
isSubTypeWhenFrozen(bounds(tp1).hi, tp2) || {
330
330
if (canConstrain(tp1) && ! approx.high)
331
331
addConstraint(tp1, tp2, fromBelow = false ) && flagNothingBound
@@ -428,7 +428,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
428
428
thirdTryNamed(tp2)
429
429
case tp2 : TypeParamRef =>
430
430
def compareTypeParamRef =
431
- (ctx.mode is Mode . TypevarsMissContext ) || {
431
+ assumedTrue(tp2 ) || {
432
432
val alwaysTrue =
433
433
// The following condition is carefully formulated to catch all cases
434
434
// where the subtype relation is true without needing to add a constraint
@@ -787,9 +787,8 @@ class TypeComparer(initctx: Context) extends ConstraintHandling {
787
787
tl => tparams1.map(tparam => tl.integrate(tparams, tparam.paramInfo).bounds),
788
788
tl => tp1base.tycon.appliedTo(args1.take(lengthDiff) ++
789
789
tparams1.indices.toList.map(tl.paramRefs(_))))
790
- (ctx.mode.is(Mode .TypevarsMissContext ) ||
791
- tryInstantiate(tycon2, tycon1.ensureLambdaSub)) &&
792
- recur(tp1, tycon1.appliedTo(args2))
790
+ (assumedTrue(tycon2) || tryInstantiate(tycon2, tycon1.ensureLambdaSub)) &&
791
+ recur(tp1, tycon1.appliedTo(args2))
793
792
}
794
793
}
795
794
case _ => false
0 commit comments