Skip to content

Commit

Permalink
Use frozenConstraint in tryHandleCaptureVars
Browse files Browse the repository at this point in the history
  • Loading branch information
bracevac committed Jan 7, 2025
1 parent b814261 commit 2799c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
*/
inline def tryHandleCaptureVars: Int =
if !(isCaptureCheckingOrSetup && isCapSet(tp1) && isCapSet(tp2)) then -1
else if (captureSet(tp1).subCaptures(captureSet(tp2), true).isOK) then 1
else if (captureSet(tp1).subCaptures(captureSet(tp2), frozenConstraint).isOK) then 1
else 0

def firstTry: Boolean = tp2 match {
Expand Down

0 comments on commit 2799c27

Please sign in to comment.