aboutsummaryrefslogblamecommitdiff
path: root/tests/run/t7899.scala
blob: 2720cb89cef38a1947d93f5e48c60ca658a0bac7 (plain) (tree)
1
2
3
4
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 ???
}