-
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: Allow
as
as an infix type in non context bound types…
…" to 3.6.2 (#21901) Backports #21849 to the 3.6.2 branch. PR submitted by the release tooling. [skip ci]
- Loading branch information
Showing
2 changed files
with
29 additions
and
9 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,19 @@ | ||
|
||
infix trait as[From, To] | ||
|
||
val conv: (String as Int) = ??? | ||
given instance: (String as Int) = ??? | ||
def test(ev: (String as Int)) = ??? | ||
|
||
class F | ||
|
||
class K extends (F as K) | ||
|
||
class TC1[X] | ||
|
||
def doSth[X: TC1 as tc] = ??? | ||
|
||
class TC2[X]: | ||
type Self = X | ||
|
||
def doSth2[X: {TC1 as tc1, TC2 as tc2}](x: tc2.Self) = ??? |