[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:
@@ -23,7 +23,11 @@ internal abstract class BaseOutput {
|
|||||||
/** JsName used to make the declaration available outside of module to test it */
|
/** JsName used to make the declaration available outside of module to test it */
|
||||||
@JsName("NodeJsOutput")
|
@JsName("NodeJsOutput")
|
||||||
internal class NodeJsOutput(val outputStream: dynamic) : BaseOutput() {
|
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 */
|
/** JsName used to make the declaration available outside of module to test it */
|
||||||
|
|||||||
Reference in New Issue
Block a user