Files
kotlin-fork/js/js.translator/testData/box/expression/function/functionLiteralAsParameter.kt
T
2016-09-29 12:00:40 +03:00

10 lines
171 B
Kotlin
Vendored

package foo
fun apply(f: (Int) -> Int, t: Int): Int {
return f(t)
}
fun box(): String {
return if (apply({ a: Int -> a + 5 }, 3) == 8) return "OK" else "fail"
}