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 0074edd73fe..469338b7fc8 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 @@ -108,6 +108,7 @@ private class AddContinuationLowering(private val context: JvmBackendContext) : private fun generateContinuationClassForLambda(info: SuspendLambdaInfo) { val suspendLambda = suspendLambda.owner suspendLambda.createContinuationClassFor(info.function).apply { + copyAttributes(info.reference) val functionNClass = context.ir.symbols.getJvmFunctionClass(info.arity + 1) superTypes.add( IrSimpleTypeImpl( @@ -443,7 +444,11 @@ private class AddContinuationLowering(private val context: JvmBackendContext) : expression.acceptChildrenVoid(this) if (expression.isSuspend) { - suspendLambdas += SuspendLambdaInfo(expression.symbol.owner, (expression.type as IrSimpleType).arguments.size - 1) + suspendLambdas += SuspendLambdaInfo( + expression.symbol.owner, + (expression.type as IrSimpleType).arguments.size - 1, + expression + ) } } }) @@ -552,7 +557,7 @@ private class AddContinuationLowering(private val context: JvmBackendContext) : } } - private class SuspendLambdaInfo(val function: IrFunction, val arity: Int) { + private class SuspendLambdaInfo(val function: IrFunction, val arity: Int, val reference: IrFunctionReference) { lateinit var constructor: IrConstructor } } diff --git a/compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt index 4a4c44d03b3..e0e912b95d6 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt @@ -1,4 +1,5 @@ // KJS_WITH_FULL_RUNTIME +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST diff --git a/compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt b/compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt index a95343ebf86..5b469fc5624 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // WITH_COROUTINES import helpers.*