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