[JS IR BE] Workaround for println

IR backend has a bug in decomposition of dynamic calls.
Workaround: don't use inline function call inside dynamic call argument.
This commit is contained in:
Svyatoslav Kuzmich
2019-04-17 16:06:54 +03:00
parent 03ba0eae5a
commit 3fd55673a8
+5 -1
View File
@@ -23,7 +23,11 @@ internal abstract class BaseOutput {
/** JsName used to make the declaration available outside of module to test it */
@JsName("NodeJsOutput")
internal class NodeJsOutput(val outputStream: dynamic) : BaseOutput() {
override fun print(message: Any?) = outputStream.write(String(message))
override fun print(message: Any?) {
// TODO: Using local variable because of bug in block decomposition lowering in IR backend
val messageString = String(message)
outputStream.write(messageString)
}
}
/** JsName used to make the declaration available outside of module to test it */