Files
kotlin/compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt
2015-04-07 13:08:53 +03:00

8 lines
169 B
Kotlin
Vendored

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)
}