aboutsummaryrefslogtreecommitdiff
path: root/tests/run
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-02-16 16:11:09 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-16 16:11:09 +0100
commit17296763448bf86c9f95b1458e5722b9829e8b3e (patch)
tree7554d9011d9f9eb140a3e0680265ad3eccb77457 /tests/run
parent06bfbd379fe350a93e3de38940fda0e359a07e1d (diff)
downloaddotty-17296763448bf86c9f95b1458e5722b9829e8b3e.tar.gz
dotty-17296763448bf86c9f95b1458e5722b9829e8b3e.tar.bz2
dotty-17296763448bf86c9f95b1458e5722b9829e8b3e.zip
Untuple using `def` not `val`.
As retronym noted on #897, `val` forces to early.
Diffstat (limited to 'tests/run')
-rw-r--r--tests/run/function-arity.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/run/function-arity.scala b/tests/run/function-arity.scala
new file mode 100644
index 000000000..6d7e5bce1
--- /dev/null
+++ b/tests/run/function-arity.scala
@@ -0,0 +1,8 @@
+object Test {
+ class T[A] { def foo(f: (=> A) => Int) = f(???) }
+
+ def main(args: Array[String]): Unit = {
+ new T[(Int, Int)].foo((ii) => 0)
+ new T[(Int, Int)].foo((x, y) => 0) // check that this does not run into ???
+ }
+}