Simplify JsInvocation in case we not it's Array
^KT-40689 fixed
This commit is contained in:
committed by
TeamCityServer
parent
e98413740b
commit
6255f2bd77
+13
-6
@@ -171,13 +171,20 @@ fun translateCall(
|
|||||||
JsBlock(
|
JsBlock(
|
||||||
JsVars(JsVars.JsVar(receiverName, jsDispatchReceiver)),
|
JsVars(JsVars.JsVar(receiverName, jsDispatchReceiver)),
|
||||||
JsReturn(
|
JsReturn(
|
||||||
JsInvocation(
|
if (argumentsAsSingleArray is JsArrayLiteral) {
|
||||||
JsNameRef("apply", JsNameRef(symbolName, receiverRef)),
|
JsInvocation(
|
||||||
listOf(
|
JsNameRef(symbolName, receiverRef),
|
||||||
receiverRef,
|
argumentsAsSingleArray.expressions
|
||||||
argumentsAsSingleArray
|
|
||||||
)
|
)
|
||||||
)
|
} else {
|
||||||
|
JsInvocation(
|
||||||
|
JsNameRef("apply", JsNameRef(symbolName, receiverRef)),
|
||||||
|
listOf(
|
||||||
|
receiverRef,
|
||||||
|
argumentsAsSingleArray
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
"VarargIIFE"
|
"VarargIIFE"
|
||||||
|
|||||||
Reference in New Issue
Block a user