File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -1492,8 +1492,8 @@ trait Implicits:
1492
1492
// need a candidate better than the two ambiguous alternatives.
1493
1493
val ambi = fail.reason.asInstanceOf [AmbiguousImplicits ]
1494
1494
healAmbiguous(fail, newCand =>
1495
- compareAlternatives(newCand, ambi.alt1) > 0 &&
1496
- compareAlternatives(newCand, ambi.alt2) > 0 )
1495
+ compareAlternatives(newCand, ambi.alt1, disambiguate = true ) > 0 &&
1496
+ compareAlternatives(newCand, ambi.alt2, disambiguate = true ) > 0 )
1497
1497
}
1498
1498
}
1499
1499
case nil =>
Original file line number Diff line number Diff line change
1
+ -- Warning: tests/warn/i15264.scala:48:26 ------------------------------------------------------------------------------
2
+ 48 | val a = summon[A[Int]] // warn
3
+ | ^
4
+ | Given search preference for repro.A[Int] between alternatives
5
+ | (repro.exports.given_A_V : [V](using x$1: priority.Prio2): repro.A[V])
6
+ | and
7
+ | (repro.exports.given_C_V : [V](using x$1: priority.Prio0): repro.C[V])
8
+ | has changed.
9
+ | Previous choice : the second alternative
10
+ | New choice from Scala 3.7: the first alternative
11
+ -- Warning: tests/warn/i15264.scala:55:29 ------------------------------------------------------------------------------
12
+ 55 | val a = summon[A[Q[Int]]] // warn
13
+ | ^
14
+ | Given search preference for repro.A[repro.Q[Int]] between alternatives
15
+ | (repro.qcontext.gcq : [V](using p0: priority.Prio0)(using c: repro.C[V]): repro.C[repro.Q[V]])
16
+ | and
17
+ | (repro.qcontext.gaq : [V](using p2: priority.Prio2)(using a: repro.A[V]): repro.A[repro.Q[V]])
18
+ | has changed.
19
+ | Previous choice : the first alternative
20
+ | New choice from Scala 3.7: the second alternative
You can’t perform that action at this time.
0 commit comments