aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/i941.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-16 14:51:30 +0100
committerMartin Odersky <odersky@gmail.com>2015-11-16 14:55:35 +0100
commit44d07275693ea0997b102b735db8703cbbbbfb74 (patch)
tree69c8cd7f9f862f1ccc8cb2693ef66002e6ac17e6 /tests/neg/i941.scala
parenta7b95b8e40df320e8f4aee59a3e382957c88d517 (diff)
downloaddotty-44d07275693ea0997b102b735db8703cbbbbfb74.tar.gz
dotty-44d07275693ea0997b102b735db8703cbbbbfb74.tar.bz2
dotty-44d07275693ea0997b102b735db8703cbbbbfb74.zip
Generalize test to function classes
The previous test was too struct, missed cases where some arguments of the function were unbound. i583a.scala contains a test case.
Diffstat (limited to 'tests/neg/i941.scala')
-rw-r--r--tests/neg/i941.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/neg/i941.scala b/tests/neg/i941.scala
new file mode 100644
index 000000000..2643c2546
--- /dev/null
+++ b/tests/neg/i941.scala
@@ -0,0 +1,9 @@
+object Test {
+
+ def bar(tl: => String) = {
+ val x = tl _ //error
+ val y = x _ // error
+ val s: String = x() // error
+ }
+
+}