Skip to content

Commit b1c362f

Browse files
oderskyEugeneFlesselle
authored andcommitted
Make priority change warning messages stable
Make priority change warning messages stable under different orders of eligible. We now always report the previously chosen alternative first and the new one second.
1 parent 0bbdcbf commit b1c362f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/warn/i15264.check

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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_C_V : [V](using x$1: priority.Prio0): repro.C[V])
6+
| and
7+
| (repro.exports.given_A_V : [V](using x$1: priority.Prio2): repro.A[V])
8+
| has changed.
9+
| Previous choice : the first alternative
10+
| New choice from Scala 3.7: the second 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.gbq : [V](using p1: priority.Prio1)(using b: repro.B[V]): repro.B[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

0 commit comments

Comments
 (0)