Files
kotlin-fork/compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt
T
2018-06-28 12:26:41 +02:00

9 lines
195 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
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)
}