-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix priority change logic for ranking
As worked out in collaboration with @EugeneFlesselle
- Loading branch information
1 parent
450d233
commit acffad6
Showing
5 changed files
with
41 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- Warning: tests/warn/i21036a.scala:7:17 ------------------------------------------------------------------------------ | ||
7 |val y = summon[A] // warn | ||
| ^ | ||
| Given search preference for A between alternatives (b : B) and (a : A) will change | ||
| Current choice : the first alternative | ||
| New choice from Scala 3.6: the second alternative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//> using options -source 3.5 | ||
trait A | ||
trait B extends A | ||
given b: B = ??? | ||
given a: A = ??? | ||
|
||
val y = summon[A] // warn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- Warning: tests/warn/i21036b.scala:7:17 ------------------------------------------------------------------------------ | ||
7 |val y = summon[A] // warn | ||
| ^ | ||
| Change in given search preference for A between alternatives (b : B) and (a : A) | ||
| Previous choice : the first alternative | ||
| New choice from Scala 3.6: the second alternative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//> using options -source 3.6-migration | ||
trait A | ||
trait B extends A | ||
given b: B = ??? | ||
given a: A = ??? | ||
|
||
val y = summon[A] // warn |