Fix interpreter error related to recreating Unit object

This commit is contained in:
Ivan Kylchik
2020-08-31 19:26:41 +03:00
committed by TeamCityServer
parent b98f680d65
commit b570d3f7fd
@@ -455,7 +455,7 @@ class IrInterpreter(private val irBuiltIns: IrBuiltIns, private val bodyMap: Map
}
private fun interpretStatements(statements: List<IrStatement>): ExecutionResult {
if (statements.isEmpty()) return Next.apply { stack.pushReturnValue(Common(irBuiltIns.unitClass.owner)) }
if (statements.isEmpty()) return getOrCreateObjectValue(irBuiltIns.unitClass.owner)
var executionResult: ExecutionResult = Next
for (statement in statements) {
when (statement) {