We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dec3404 commit 46ab58bCopy full SHA for 46ab58b
compiler/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -451,7 +451,11 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] {
451
// widening in `fourthTry` before adding to the constraint.
452
if (frozenConstraint) isSubType(tp1, bounds(tp2).lo)
453
else isSubTypeWhenFrozen(tp1, tp2)
454
- alwaysTrue || {
+ alwaysTrue ||
455
+ frozenConstraint && (tp1 match {
456
+ case tp1: TypeParamRef => constraint.isLess(tp1, tp2)
457
+ case _ => false
458
+ }) || {
459
if (canConstrain(tp2) && !approx.low)
460
addConstraint(tp2, tp1.widenExpr, fromBelow = true)
461
else fourthTry
0 commit comments