blob: a8b35c91c9f4445f945dbc06d3375c3a750a6645 (
plain) (
tree)
|
|
class Arne[@specialized(Long) T](x: T) {
val regularVal = x
lazy val lazyVal = x
def apply(f: (T, T) => T): T = f(regularVal, lazyVal)
}
object Test {
val arne = new Arne(5L)
def f = arne(_ + _)
def main(args: Array[String]): Unit = {
println(f)
}
}
|