summaryrefslogtreecommitdiff
path: root/test/files/pos/fun_undo_eta.scala
blob: 466b0e2629c0cce47c1b0dce516a610aa9e661be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
class Test {
  def m(i: Int) = i

  def expectWild[A](f: A) = ???
  def expectFun[A](f: A => Int) = ???

  expectWild((i => m(i))) // manual eta expansion
  expectWild(m(_)) // have to undo eta expansion with wildcard expected type
  expectFun(m(_)) // have to undo eta expansion with function expected type
}