Files
kotlin-fork/js/js.translator/testData/box/expression/function/functionLiteralAsLastParameter.kt
T
2018-04-19 13:17:28 +03:00

16 lines
256 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1111
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"
}