Return Unit value from block if statements count is equal to zero
This commit is contained in:
committed by
TeamCityServer
parent
13ab7eafca
commit
a084dabdde
@@ -448,6 +448,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)) }
|
||||
var executionResult: ExecutionResult = Next
|
||||
for (statement in statements) {
|
||||
when (statement) {
|
||||
|
||||
Reference in New Issue
Block a user