-
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: Allow
as
as an infix type in non context bound types
[Cherry-picked e7221c6]
- Loading branch information
1 parent
7ee2683
commit dac7f7e
Showing
2 changed files
with
32 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) = ??? |