Skip to content

Commit c54dbbf

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

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
@@ -1733,7 +1733,7 @@ trait Applications extends Compatibility {
17331733
def compare(alt1: TermRef, alt2: TermRef, preferGeneral: Boolean = false)(using Context): Int = trace(i"compare($alt1, $alt2)", overload) {
17341734
record("resolveOverloaded.compare")
17351735

1736-
val compareGivens = alt1.symbol.is(Given) || alt2.symbol.is(Given)
1736+
val compareGivens = alt1.symbol.is(Given) && alt2.symbol.is(Given)
17371737

17381738
/** Is alternative `alt1` with type `tp1` as good as alternative
17391739
* `alt2` with type `tp2` ?

0 commit comments

Comments
 (0)