Files
kotlin-fork/js/js.translator/testData/box/expression/function/functionLiteralAsLastParameter.kt
T
2018-09-12 09:49:25 +03:00

15 lines
231 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1283
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"
}