Files
kotlin/compiler/testData/codegen/classes/closureWithParameterAndBoxing.jet
2011-12-20 22:56:13 +04:00

8 lines
171 B
Plaintext

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