diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt index d5a9eef269b..ef4301876e8 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt @@ -336,9 +336,16 @@ class ExpressionCodegen( mv.anew(asmType) mv.dup() } - expression is IrDelegatingConstructorCall -> + expression is IrDelegatingConstructorCall -> { // In this case the receiver is `this` (not specified in IR) and the return value is discarded anyway. mv.load(0, OBJECT_TYPE) + + for (argumentIndex in 0 until expression.typeArgumentsCount) { + expression.getTypeArgument(argumentIndex)?.getTypeParameterOrNull()?.takeIf { it.isReified }?.let { + consumeReifiedOperationMarker(it) + } + } + } expression.descriptor is ConstructorDescriptor -> throw AssertionError("IrCall with ConstructorDescriptor: ${expression.javaClass.simpleName}") callee.isSuspend && !irFunction.isInvokeSuspendInContinuation() -> addInlineMarker(mv, isStartNotEnd = true) diff --git a/compiler/testData/codegen/box/regressions/kt6485.kt b/compiler/testData/codegen/box/regressions/kt6485.kt index 776a2bbc8c8..26e99c5e6a0 100644 --- a/compiler/testData/codegen/box/regressions/kt6485.kt +++ b/compiler/testData/codegen/box/regressions/kt6485.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt b/compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt index feea4399dde..c8506afd518 100644 --- a/compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt +++ b/compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/approximateCapturedTypes.kt b/compiler/testData/codegen/box/reified/approximateCapturedTypes.kt index 3d55f342772..97cae1cce6d 100644 --- a/compiler/testData/codegen/box/reified/approximateCapturedTypes.kt +++ b/compiler/testData/codegen/box/reified/approximateCapturedTypes.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/innerAnonymousObject.kt b/compiler/testData/codegen/box/reified/innerAnonymousObject.kt index 2b4ece65fcf..72ad5bc6347 100644 --- a/compiler/testData/codegen/box/reified/innerAnonymousObject.kt +++ b/compiler/testData/codegen/box/reified/innerAnonymousObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt b/compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt index cf6d2375724..33ce0ad2d8a 100644 --- a/compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt +++ b/compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/boxInline/reified/kt11081.kt b/compiler/testData/codegen/boxInline/reified/kt11081.kt index 2e7d6d5640c..76132d061a6 100644 --- a/compiler/testData/codegen/boxInline/reified/kt11081.kt +++ b/compiler/testData/codegen/boxInline/reified/kt11081.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // FILE: 1.kt // WITH_REFLECT diff --git a/compiler/testData/codegen/boxInline/reified/kt11677.kt b/compiler/testData/codegen/boxInline/reified/kt11677.kt index a87a604d84a..49ce1597496 100644 --- a/compiler/testData/codegen/boxInline/reified/kt11677.kt +++ b/compiler/testData/codegen/boxInline/reified/kt11677.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // FILE: 1.kt // FULL_JDK diff --git a/compiler/testData/codegen/boxInline/reified/packages.kt b/compiler/testData/codegen/boxInline/reified/packages.kt index b681968171e..508bff65a38 100644 --- a/compiler/testData/codegen/boxInline/reified/packages.kt +++ b/compiler/testData/codegen/boxInline/reified/packages.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // TARGET_BACKEND: JVM // FILE: 1.kt // WITH_REFLECT