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

14 lines
197 B
Kotlin
Vendored

package foo
fun f(a: (Int) -> Int) = a(1)
fun box(): String {
if (f() {
it + 2
} != 3) return "fail1"
if (f() { a: Int -> a * 300 } != 300) return "fail2"
return "OK"
}