Files
kotlin-fork/js/js.translator/testData/box/jsModule/topLevelVarargFun.kt
T
Alexey Andreev 3b3fd0fa0d JS: fix DCE limits in test data to fit new kotlin.js size
The size has increased due to new implementation of KClass
2017-10-06 18:16:51 +03:00

15 lines
308 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1111
// MODULE_KIND: AMD
@JsModule("bar")
external fun foo(vararg arg: String): String
fun box(): String {
val x = arrayOf("a", "b")
var r = foo(*x)
if (r != "(ab)") return "fail1: $r"
r = foo("c", "d")
if (r != "(cd)") return "fail2: $r"
return "OK"
}