Files
kotlin-fork/js/js.translator/testData/box/inline/faultyRedundantCallElimination.kt
T
Anton Bannykh 4e496cf2b2 JS: don't throw AssertionError from RedundantCallElimination
Also mark JS `call` function to avoid removing a custom `call`
2018-08-23 14:44:40 +03:00

27 lines
367 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1189
// 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)