aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/function-arity.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-01 10:23:43 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-16 15:24:15 +0100
commit62a526eeb664da5f0a7982375f0f77618b6b3f92 (patch)
treef7fae2fd87e0ca253ca94b80838138fa893b74ed /tests/neg/function-arity.scala
parent29104c9755a9d6393959a416650422b84f0957f2 (diff)
downloaddotty-62a526eeb664da5f0a7982375f0f77618b6b3f92.tar.gz
dotty-62a526eeb664da5f0a7982375f0f77618b6b3f92.tar.bz2
dotty-62a526eeb664da5f0a7982375f0f77618b6b3f92.zip
Add more pos and neg tests
Tests suggested by @retronym's comments on issue #897.
Diffstat (limited to 'tests/neg/function-arity.scala')
-rw-r--r--tests/neg/function-arity.scala4
1 files changed, 3 insertions, 1 deletions
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)
}