From 62a526eeb664da5f0a7982375f0f77618b6b3f92 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 1 Nov 2015 10:23:43 +0100 Subject: Add more pos and neg tests Tests suggested by @retronym's comments on issue #897. --- tests/neg/function-arity.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/neg/function-arity.scala') diff --git a/tests/neg/function-arity.scala b/tests/neg/function-arity.scala index 83aa94482..86fbab49f 100644 --- a/tests/neg/function-arity.scala +++ b/tests/neg/function-arity.scala @@ -18,5 +18,7 @@ object Test { unary[(Int, Int)]((x: String, y) => ()) // error - + def foo(a: Tuple2[Int, Int] => String): String = "" + def foo(a: Any => String) = () + foo((a: Int, b: String) => a + b) // error: none of the overloaded alternatives of method foo match arguments (Int, Int) } -- cgit v1.2.3