-
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.
Backport "fix: Only implement a deferred given in a class if its pare…
…nt won't implement it" to 3.5.2 (#21473) Backports #21206 to the 3.5.2 branch. PR submitted by the release tooling. [skip ci]
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
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,12 @@ | ||
//> using options -source:future -language:experimental.modularity | ||
|
||
class MySortedSet[T : Ord] extends SortedSet[T] | ||
|
||
trait Ord[T] | ||
|
||
trait Sorted[T] extends ParentOfSorted[T] | ||
|
||
trait ParentOfSorted[T]: | ||
given Ord[T] as ord = compiletime.deferred | ||
|
||
class SortedSet[T : Ord] extends Sorted[T] |
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,10 @@ | ||
//> using options -source:future -language:experimental.modularity | ||
|
||
class MySortedSet[T : Ord] extends SortedSet[T] | ||
|
||
trait Ord[T] | ||
|
||
trait Sorted[T]: | ||
given Ord[T] as ord = compiletime.deferred | ||
|
||
class SortedSet[T : Ord] extends Sorted[T] |