diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt index d3fb0521cd3..7eefd3d58d8 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt @@ -152,6 +152,9 @@ private fun IrFunction.suspendFunctionView(context: JvmBackendContext): IrFuncti ).also { descriptor.bind(it) it.parent = parent + + it.annotations.addAll(annotations) + it.copyTypeParametersFrom(this) it.dispatchReceiverParameter = dispatchReceiverParameter?.copyTo(it) diff --git a/compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt b/compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt index 7b5de413be2..bffee8a5695 100644 --- a/compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt +++ b/compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND_FIR: JVM_IR -// IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JS_IR // WITH_REFLECT // IGNORE_BACKEND: JS, NATIVE diff --git a/compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines/annotatedSuspendFun.kt b/compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines/annotatedSuspendFun.kt index 467138c4f6a..8459c2e40db 100644 --- a/compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines/annotatedSuspendFun.kt +++ b/compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines/annotatedSuspendFun.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR //ALLOW_AST_ACCESS package test