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 81fdbad7028..285e9f9afb4 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 @@ -10,7 +10,6 @@ import org.jetbrains.kotlin.backend.common.ir.* import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.DescriptorVisibilities import org.jetbrains.kotlin.ir.IrElement -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI import org.jetbrains.kotlin.ir.builders.* import org.jetbrains.kotlin.ir.builders.declarations.buildClass import org.jetbrains.kotlin.ir.builders.declarations.buildConstructor @@ -30,7 +29,6 @@ import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.ir.visitors.* import org.jetbrains.kotlin.name.Name -@ObsoleteDescriptorBasedAPI abstract class AbstractSuspendFunctionsLowering(val context: C) : FileLoweringPass { protected object STATEMENT_ORIGIN_COROUTINE_IMPL : IrStatementOriginImpl("COROUTINE_IMPL") @@ -115,7 +113,7 @@ abstract class AbstractSuspendFunctionsLowering(val co val coroutine = builtCoroutines[expression.symbol.owner] ?: throw Error("Non-local callable reference to suspend lambda: $expression") val constructorParameters = coroutine.coroutineConstructor.valueParameters - val expressionArguments = expression.getArguments().map { it.second } + val expressionArguments = expression.getArgumentsWithIr().map { it.second } assert(constructorParameters.size == expressionArguments.size) { "Inconsistency between callable reference to suspend lambda and the corresponding coroutine" } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt index c857663a888..c2d8608213b 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt @@ -27,6 +27,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.safeAs * Binds the arguments explicitly represented in the IR to the parameters of the accessed function. * The arguments are to be evaluated in the same order as they appear in the resulting list. */ +@Suppress("unused") // used in kotlin-native @ObsoleteDescriptorBasedAPI fun IrMemberAccessExpression<*>.getArguments(): List> { val res = mutableListOf>()