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.
fix: Allow
as
as an infix type in non context bound types
- Loading branch information
1 parent
dd37f07
commit a399900
Showing
2 changed files
with
33 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,20 @@ | ||
//> using scala 3.nightly | ||
|
||
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) = ??? |