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()) {