Skip to content

Commit 7da033b

Browse files
committed
Disable refined preference scheme for implicits
Turns out it's not transitive when combined with the old scheme. So it should be one or the other. Conservatively, this commit reverts to the old scheme.
1 parent e1cf2c9 commit 7da033b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ trait Implicits { self: Typer =>
920920
* `cand1` has been selected as an implicit more often than `cand2`.
921921
*/
922922
def prefer(cand1: Candidate, cand2: Candidate): Boolean = {
923-
val sym1 = cand1.ref.symbol
923+
/*val sym1 = cand1.ref.symbol
924924
val sym2 = cand2.ref.symbol
925925
if (sym1.associatedFile == sym2.associatedFile) {
926926
val coord1 = sym1.coord
@@ -933,6 +933,7 @@ trait Implicits { self: Typer =>
933933
if (coord1.isIndex && coord2.isIndex)
934934
return coord1.toIndex < coord2.toIndex
935935
}
936+
*/
936937
ranking(cand1) < ranking(cand2)
937938
}
938939

0 commit comments

Comments
 (0)