forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do prefix comparison only as a final tie breaker
The alternatives with the same symbol could have nevertheless different types. We first want to disambiguate based on these types before we turn to prefixes as a final tie breaker, including after trying comparison with implicit parameters.
- Loading branch information
1 parent
2e640c2
commit 381285b
Showing
2 changed files
with
21 additions
and
21 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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
|
||
class I[X] | ||
class J[X] | ||
|
||
trait A: | ||
given I[B] = ??? | ||
given (using I[B]): J[B] = ??? | ||
object A extends A | ||
|
||
trait B extends A | ||
object B extends B | ||
|
||
//import B.given, A.given | ||
|
||
def Test = summon[I[B]] | ||
|
||
|
||
def Test = | ||
summon[I[B]] | ||
summon[J[B]] |