Skip to content

Commit 5a14797

Browse files
Disable owner comparison in implicits sorting function
It appears to break the `prefer` function's contract as a comparator function.
1 parent 2116281 commit 5a14797

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,9 +1169,9 @@ trait Implicits { self: Typer =>
11691169
if (level1 < level2) return false
11701170
val sym1 = cand1.ref.symbol
11711171
val sym2 = cand2.ref.symbol
1172-
val ownerScore = compareOwner(sym1.maybeOwner, sym2.maybeOwner)
1173-
if (ownerScore > 0) return true
1174-
if (ownerScore < 0) return false
1172+
// val ownerScore = compareOwner(sym1.maybeOwner, sym2.maybeOwner)
1173+
// if (ownerScore > 0) return true
1174+
// if (ownerScore < 0) return false
11751175
val arity1 = sym1.info.firstParamTypes.length
11761176
val arity2 = sym2.info.firstParamTypes.length
11771177
if (arity1 < arity2) return true

0 commit comments

Comments
 (0)