summaryrefslogtreecommitdiff
path: root/test/files/run/t7899.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t7899.scala')
-rw-r--r--test/files/run/t7899.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/run/t7899.scala b/test/files/run/t7899.scala
new file mode 100644
index 0000000000..5879d4b9fe
--- /dev/null
+++ b/test/files/run/t7899.scala
@@ -0,0 +1,5 @@
+object Test extends App {
+ def id[A](a: => A): A = null.asInstanceOf[A]
+ def foo(f: (=> Int) => Int) = () => f(???)
+ foo(id)() // should be allowed and not throw ???
+}