[Native] Support suspend functions as supertypes (remove debug code)
^KT-46777
This commit is contained in:
+2
-4
@@ -150,8 +150,7 @@ abstract class AbstractSuspendFunctionsLowering<C : CommonBackendContext>(val co
|
|||||||
expression.acceptChildrenVoid(this)
|
expression.acceptChildrenVoid(this)
|
||||||
|
|
||||||
if (expression.isSuspend) {
|
if (expression.isSuspend) {
|
||||||
val old = suspendLambdas.put(expression.symbol.owner, expression)
|
suspendLambdas[expression.symbol.owner] = expression
|
||||||
if (old != null) error("Rewriting $old")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -283,8 +282,7 @@ abstract class AbstractSuspendFunctionsLowering<C : CommonBackendContext>(val co
|
|||||||
|
|
||||||
private fun buildCoroutine(irFunction: IrSimpleFunction, functionReference: IrFunctionReference?): IrClass {
|
private fun buildCoroutine(irFunction: IrSimpleFunction, functionReference: IrFunctionReference?): IrClass {
|
||||||
val coroutine = CoroutineBuilder(irFunction, functionReference).build()
|
val coroutine = CoroutineBuilder(irFunction, functionReference).build()
|
||||||
val old = builtCoroutines.put(irFunction, coroutine)
|
builtCoroutines[irFunction] = coroutine
|
||||||
if (old != null) error("Rewriting $old")
|
|
||||||
|
|
||||||
if (functionReference == null) {
|
if (functionReference == null) {
|
||||||
// It is not a lambda - replace original function with a call to constructor of the built coroutine.
|
// It is not a lambda - replace original function with a call to constructor of the built coroutine.
|
||||||
|
|||||||
Reference in New Issue
Block a user