Files
kotlin-fork/js/js.translator/testData/box/inline/faultyRedundantCallElimination.kt
T
Ilya Gorbunov aa69933ee0 Update EXPECTED_REACHABLE_NODES
DCE doesn't remove DurationUnit and some other kotlin.time stuff in these cases
2019-06-18 04:02:36 +03:00

26 lines
342 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1311
// MODULE: lib
// FILE: lib.kt
fun String.call() = this + "O"
inline fun O() = "".call()
object A {
val foo = Foo
}
object Foo {
@JsName("call")
fun call(a: A, k: String) = k
}
inline fun K(a: A) = a.foo.call(a, "K")
// MODULE: main(lib)
// FILE: main.kt
val a = A
fun box() = O() + K(a)