From 0f7dc6e8afb94aaf186746a1d89a8972e48a60df Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Wed, 13 Jun 2018 10:39:45 +0200 Subject: [PATCH] Fix IMPLICIT_COERCION_TO_UNIT --- .../jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() }