From edd0ac6c6f14b42b934b6634330aeab32b76299c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven=20Sch=C3=A4fer?= Date: Mon, 3 Feb 2020 12:40:24 +0100 Subject: [PATCH] JVM IR: Fix types of temporaries in AddContinuationLowering --- .../kotlin/backend/jvm/lower/AddContinuationLowering.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt index 6e60a7356a4..fb3bd104627 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt @@ -269,7 +269,7 @@ private class AddContinuationLowering(private val context: JvmBackendContext) : createCall.putValueArgument(0, irGet(function.valueParameters[0])) } createCall.putValueArgument(if (receiverField != null) 1 else 0, irGet(function.valueParameters.last())) - }, "create") + }, "create", irType = defaultType) // Start coroutine +irReturn(irCall(invokeSuspend).also { invokeSuspendCall -> invokeSuspendCall.dispatchReceiver = irGet(newlyCreatedObject) @@ -306,7 +306,7 @@ private class AddContinuationLowering(private val context: JvmBackendContext) : constructorCall.putValueArgument(index, irGetField(irGet(function.dispatchReceiverParameter!!), field)) } constructorCall.putValueArgument(parametersWithArguments.size, irGet(function.valueParameters.last())) - }, "constructor") + }, "constructor", irType = defaultType) // Move parameters into fields (instead of `create`) if (parametersWithoutArguments.isNotEmpty()) { for ((index, param) in function.valueParameters.dropLast(1).withIndex()) {