[Native] Support suspend functions as supertypes (remove debug code) ^KT-46777
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt index 72cc614..828aa75 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt
@@ -150,8 +150,7 @@ expression.acceptChildrenVoid(this) if (expression.isSuspend) { - val old = suspendLambdas.put(expression.symbol.owner, expression) - if (old != null) error("Rewriting $old") + suspendLambdas[expression.symbol.owner] = expression } } }) @@ -283,8 +282,7 @@ private fun buildCoroutine(irFunction: IrSimpleFunction, functionReference: IrFunctionReference?): IrClass { val coroutine = CoroutineBuilder(irFunction, functionReference).build() - val old = builtCoroutines.put(irFunction, coroutine) - if (old != null) error("Rewriting $old") + builtCoroutines[irFunction] = coroutine if (functionReference == null) { // It is not a lambda - replace original function with a call to constructor of the built coroutine.