We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07d8ff8 commit 1e39a10Copy full SHA for 1e39a10
tests/run/multi-apply.scala
@@ -0,0 +1,11 @@
1
+class MultiApply extends (Int => Int) with ((Int, Int) => Int) {
2
+ def apply(x: Int): Int = x + x
3
+ def apply(x: Int, y: Int): Int = x * y
4
+}
5
+
6
+@main
7
+def Test = {
8
+ val fun = new MultiApply
9
+ assert(fun(2) == 4)
10
+ assert(fun(2, 3) == 6)
11
0 commit comments