diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt index 74d21bdf71e..9fe1a084056 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/ClassMemberGenerator.kt @@ -144,9 +144,11 @@ internal class ClassMemberGenerator( val classId = firFunction?.symbol?.callableId?.classId when { DataClassMembersGenerator.isComponentN(irFunction) -> - DataClassMembersGenerator(components).generateDataClassComponentBody(irFunction, classId!!) + firFunction?.body?.let { irFunction.body = visitor.convertToIrBlockBody(it) } + ?: DataClassMembersGenerator(components).generateDataClassComponentBody(irFunction, classId!!) DataClassMembersGenerator.isCopy(irFunction) -> - DataClassMembersGenerator(components).generateDataClassCopyBody(irFunction, classId!!) + firFunction?.body?.let { irFunction.body = visitor.convertToIrBlockBody(it) } + ?: DataClassMembersGenerator(components).generateDataClassCopyBody(irFunction, classId!!) else -> irFunction.body = firFunction?.body?.let { visitor.convertToIrBlockBody(it) } } diff --git a/compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt index 05066cfa29c..e65f3f23746 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST diff --git a/compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt index e6a3ac65255..c8e7b616b80 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST