diff --git a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrInterpreter.kt b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrInterpreter.kt index 0f2309dbb10..954d143d5fd 100644 --- a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrInterpreter.kt +++ b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrInterpreter.kt @@ -728,14 +728,13 @@ class IrInterpreter(private val irBuiltIns: IrBuiltIns, private val bodyMap: Map for (catchBlock in expression.catches) { if (exception.isSubtypeOf(catchBlock.catchParameter.type.classOrNull!!.owner)) { catchBlock.interpret().check { return it } - break + return Next } } + return Exception } finally { - expression.finallyExpression?.interpret()?.check { return it } + expression.finallyExpression?.takeIf { (it as? IrBlock)?.statements?.isEmpty() != true }?.interpret()?.check { return it } } - - return Next } private fun interpretCatch(expression: IrCatch): ExecutionResult {