Files
kotlin-fork/compiler/testData/codegen/classes/closureWithParameterAndBoxing.kt
T
2013-01-24 21:12:27 +04:00

8 lines
171 B
Kotlin

fun box() : String {
return if (apply( 5, {(arg: Int) -> arg + 13 } ) == 18) "OK" else "fail"
}
fun apply(arg : Int, f : (p:Int) -> Int) : Int {
return f(arg)
}