[JS IR] Concat varargs with non varargs on compile time for function w/o receiver
This commit is contained in:
+11
-4
@@ -205,10 +205,17 @@ fun translateCall(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
JsInvocation(
|
||||
JsNameRef("apply", JsNameRef(symbolName)),
|
||||
listOf(JsNullLiteral(), argumentsAsSingleArray)
|
||||
)
|
||||
if (argumentsAsSingleArray is JsArrayLiteral) {
|
||||
JsInvocation(
|
||||
JsNameRef(symbolName),
|
||||
argumentsAsSingleArray.expressions
|
||||
)
|
||||
} else {
|
||||
JsInvocation(
|
||||
JsNameRef("apply", JsNameRef(symbolName)),
|
||||
listOf(JsNullLiteral(), argumentsAsSingleArray)
|
||||
)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
JsInvocation(ref, listOfNotNull(jsExtensionReceiver) + arguments)
|
||||
|
||||
Reference in New Issue
Block a user