diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt index 0d46eeeda75..5c9633a1515 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt @@ -585,8 +585,8 @@ class ExpressionCodegen( val asmType = expression.typeOperand.asmType when (expression.operator) { IrTypeOperator.IMPLICIT_COERCION_TO_UNIT -> { - expression.argument.accept(this, data) - coerce(expression.argument.asmType, Type.VOID_TYPE, mv) + val result = expression.argument.accept(this, data) + coerce(result.type, Type.VOID_TYPE, mv) return none() }