Fix translation to JS of call to top-level fun with vararg and @JsModule

See KT-17871
This commit is contained in:
Alexey Andreev
2017-05-25 14:28:38 +03:00
parent e2fc808d83
commit f5510b8d66
4 changed files with 28 additions and 2 deletions
@@ -0,0 +1,15 @@
// EXPECTED_REACHABLE_NODES: 490
// 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"
}