summaryrefslogtreecommitdiff
path: root/test/files/neg/sammy_wrong_arity.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/sammy_wrong_arity.scala')
-rw-r--r--test/files/neg/sammy_wrong_arity.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/neg/sammy_wrong_arity.scala b/test/files/neg/sammy_wrong_arity.scala
new file mode 100644
index 0000000000..d03d266a0b
--- /dev/null
+++ b/test/files/neg/sammy_wrong_arity.scala
@@ -0,0 +1,22 @@
+trait T0 { def ap(): Int }
+trait T1 { def ap(a: Any): Int }
+trait T2 { def ap(a: Any, b: Any): Int }
+
+class Test {
+ (() => 0): T1
+ ((x: Any) => 0): T2
+
+ ((x: Any) => 0): T0
+ ((x: Any) => 0): T2
+
+ ((x: Any, y: Any) => 0): T0
+ ((x: Any, y: Any) => 0): T1
+
+ ((x) => 0): T2
+
+ ((x) => 0): T0
+ ((x) => 0): T2
+
+ ((x, y) => 0): T0
+ ((x, y) => 0): T1
+}