Files
kotlin-fork/compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt
T
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +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)
}