diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/SignatureString.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/SignatureString.kt index 17362012239..e54caf33493 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/SignatureString.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/SignatureString.kt @@ -12,6 +12,7 @@ import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression import org.jetbrains.kotlin.ir.expressions.IrFunctionReference import org.jetbrains.kotlin.ir.util.collectRealOverrides +import org.jetbrains.kotlin.ir.util.isSuspend import org.jetbrains.kotlin.resolve.jvm.AsmTypes /** @@ -21,7 +22,10 @@ import org.jetbrains.kotlin.resolve.jvm.AsmTypes object SignatureString : IntrinsicMethod() { override fun invoke(expression: IrFunctionAccessExpression, codegen: ExpressionCodegen, data: BlockInfo): PromisedValue? { val function = (expression.getValueArgument(0) as IrFunctionReference).symbol.owner - val resolved = if (function is IrSimpleFunction) function.collectRealOverrides().first() else function + var resolved = if (function is IrSimpleFunction) function.collectRealOverrides().first() else function + if (resolved.isSuspend) { + resolved = codegen.context.suspendFunctionOriginalToView[resolved] ?: resolved + } val method = codegen.context.methodSignatureMapper.mapAsmMethod(resolved) val descriptor = method.name + method.descriptor return object : PromisedValue(codegen, AsmTypes.JAVA_STRING_TYPE, codegen.context.irBuiltIns.stringType) { diff --git a/compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/fromJava.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/fromJava.kt index fc37323b191..83b8a7d7baf 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/fromJava.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/fromJava.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND_FIR: JVM_IR -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_COROUTINES // WITH_REFLECT diff --git a/compiler/testData/codegen/box/coroutines/reflect/callSuspend.kt b/compiler/testData/codegen/box/coroutines/reflect/callSuspend.kt index 631be3453ba..88931d232cb 100644 --- a/compiler/testData/codegen/box/coroutines/reflect/callSuspend.kt +++ b/compiler/testData/codegen/box/coroutines/reflect/callSuspend.kt @@ -2,7 +2,6 @@ // WITH_COROUTINES // WITH_REFLECT // TARGET_BACKEND: JVM -// IGNORE_BACKEND: JVM_IR import helpers.* import kotlin.coroutines.* diff --git a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit/reflection.kt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit/reflection.kt index 0649fa163ae..435dd54c3eb 100644 --- a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit/reflection.kt +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit/reflection.kt @@ -1,6 +1,5 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM -// IGNORE_BACKEND: JVM_IR // FULL_JDK // WITH_RUNTIME // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/modifiers/functions.kt b/compiler/testData/codegen/box/reflection/modifiers/functions.kt index 529f40517b2..702a6c2a975 100644 --- a/compiler/testData/codegen/box/reflection/modifiers/functions.kt +++ b/compiler/testData/codegen/box/reflection/modifiers/functions.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +ReleaseCoroutines // IGNORE_BACKEND_FIR: JVM_IR -// IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS, NATIVE