Skip to content

Commit 9586782

Browse files
committed
Switch to new rules only if both sides are givens
(rather than implicits).
1 parent 00cb35a commit 9586782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,7 @@ trait Applications extends Compatibility {
17021702
def compare(alt1: TermRef, alt2: TermRef, preferGeneral: Boolean = false)(using Context): Int = trace(i"compare($alt1, $alt2)", overload) {
17031703
record("resolveOverloaded.compare")
17041704

1705-
val compareGivens = alt1.symbol.is(Given) || alt2.symbol.is(Given)
1705+
val compareGivens = alt1.symbol.is(Given) && alt2.symbol.is(Given)
17061706

17071707
/** Is alternative `alt1` with type `tp1` as good as alternative
17081708
* `alt2` with type `tp2` ?

0 commit comments

Comments
 (0)