Files
kotlin-fork/js/js.translator/testData/box/expression/misc/packagePropertyCalledAsFun.kt
T
Anton Bannykh b551afb202 JS IR: minor fix for callable ref translation
The caching variable has to have no initializers so that there is no
dependence on evaluation order.
2018-06-18 13:15:19 +03:00

12 lines
191 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1111
package foo
fun lold() = true
val p = { { lold() }() }
fun box(): String {
if (!p()) return "fail1"
if (!foo.p()) return "fail2"
return "OK"
}