aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/functions1.scala
blob: 12df12e501305853f5911f5c297e0d934e788a33 (plain) (tree)
1
2
3
4
5
6
7
8
9
10







                                           

                                          



                               
class X(val elem: Int) extends Object {
  def foo(y: String): Int = y.length + elem
}

object Functions {

  val x = new X(2)
  val xe = x.elem
  val xf: String => Int = x.foo(_: String)
  val xf2: String => Int = x.foo(_)
  val x2: String => Int = x.foo
  val x3 = x.foo _

}