diff --git a/tests/run/multi-apply.scala b/tests/run/multi-apply.scala new file mode 100644 index 000000000000..5b7fd24ddb27 --- /dev/null +++ b/tests/run/multi-apply.scala @@ -0,0 +1,11 @@ +class MultiApply extends (Int => Int) with ((Int, Int) => Int) { + def apply(x: Int): Int = x + x + def apply(x: Int, y: Int): Int = x * y +} + +@main +def Test = { + val fun = new MultiApply + assert(fun(2) == 4) + assert(fun(2, 3) == 6) +} \ No newline at end of file