[JS IR BE] Check number of value arguments in toString

This commit is contained in:
Svyatoslav Kuzmich
2018-08-23 19:55:17 +03:00
parent a3afd101fa
commit 437a68daca
@@ -509,6 +509,9 @@ fun shouldReplaceToStringWithRuntimeCall(call: IrCall): Boolean {
// - Use direct method call for dynamic types???
// - Define Any?.toString() in runtime library and stop intrincifying extensions
if (call.valueArgumentsCount > 0)
return false
val receiverParameterType = with(call.symbol.owner) {
dispatchReceiverParameter ?: extensionReceiverParameter
}?.type ?: return false