Skip to content

Commit 0b8e102

Browse files
Restore behaviour avoiding incorrect warnings
Specifically, in cases where we could report a change in prioritization, despite having not done `tryImplicit` on the alternative, i.e. it was only compared as part of an early filtering
1 parent b1c362f commit 0b8e102

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/typer/Implicits.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1492,8 +1492,8 @@ trait Implicits:
14921492
// need a candidate better than the two ambiguous alternatives.
14931493
val ambi = fail.reason.asInstanceOf[AmbiguousImplicits]
14941494
healAmbiguous(fail, newCand =>
1495-
compareAlternatives(newCand, ambi.alt1, disambiguate = true) > 0 &&
1496-
compareAlternatives(newCand, ambi.alt2, disambiguate = true) > 0)
1495+
compareAlternatives(newCand, ambi.alt1) > 0 &&
1496+
compareAlternatives(newCand, ambi.alt2) > 0)
14971497
}
14981498
}
14991499
case nil =>

0 commit comments

Comments
 (0)