-
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.
Allow autotupling if fn's param is a type param
[Cherry-picked 9d2aeac]
- Loading branch information
1 parent
b8a10a4
commit 1633ccd
Showing
4 changed files
with
39 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,15 @@ | ||
sealed abstract class Gen[+T1] | ||
given [T2]: Conversion[T2, Gen[T2]] = ??? | ||
|
||
trait Show[T3] | ||
given Show[Boolean] = ??? | ||
given [A1: Show, B1: Show, C1: Show]: Show[(A1, B1, C1)] = ??? | ||
|
||
object ForAll: | ||
def apply[A2: Show, B2](f: A2 => B2): Unit = ??? | ||
def apply[A3: Show, B3: Show, C3](f: (A3, B3) => C3): Unit = ??? | ||
def apply[A4: Show, B4](gen: Gen[A4])(f: A4 => B4): Unit = ??? | ||
|
||
@main def Test = | ||
ForAll: (b1: Boolean, b2: Boolean, b3: Boolean) => | ||
??? |
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,7 @@ | ||
object ForAll: | ||
def apply[A1, B](f: A1 => B): Unit = ??? | ||
def apply[A1, A2, B](f: (A1, A2) => B): Unit = ??? | ||
|
||
@main def Test = | ||
ForAll: (b1: Boolean, b2: Boolean, b3: Boolean) => | ||
??? |
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,4 @@ | ||
class Test: | ||
def foo[A1 >: (Nothing, Boolean, Nothing) <: (Any, Boolean, Any), B](f: A1 => B): Unit = ??? | ||
def test(): Unit = | ||
val res4 = this.foo((b1: Boolean, b2: Boolean, b3: Boolean) => ???) |