diff options
author | Martin Odersky <odersky@gmail.com> | 2016-02-16 15:49:00 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-02-16 15:49:13 +0100 |
commit | 06bfbd379fe350a93e3de38940fda0e359a07e1d (patch) | |
tree | b6624c554c7234825e4e3963d8c49be8109ef357 /tests/neg/function-arity.scala | |
parent | e5f8697cf54be6cfa82884eb2f4c4e4d79af2700 (diff) | |
download | dotty-06bfbd379fe350a93e3de38940fda0e359a07e1d.tar.gz dotty-06bfbd379fe350a93e3de38940fda0e359a07e1d.tar.bz2 dotty-06bfbd379fe350a93e3de38940fda0e359a07e1d.zip |
Strengthen requirement for auto-tupling
Was: corresponding parameter types "are compatible".
Now: corresponding parameter types "conform".
This avoids the inconsistency mentioned by @retronym in #897.
Diffstat (limited to 'tests/neg/function-arity.scala')
-rw-r--r-- | tests/neg/function-arity.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/neg/function-arity.scala b/tests/neg/function-arity.scala index 86fbab49f..5e0cb1058 100644 --- a/tests/neg/function-arity.scala +++ b/tests/neg/function-arity.scala @@ -22,3 +22,7 @@ object Test { 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) } +object jasonComment { + implicit def i2s(i: Int): String = i.toString + ((x: String, y: String) => 42) : (((Int, Int)) => String) // error +} |