diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JvmSupertypeUpdater.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JvmSupertypeUpdater.kt index f61b33e7876..1b5d964fbba 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JvmSupertypeUpdater.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JvmSupertypeUpdater.kt @@ -59,7 +59,7 @@ class JvmSupertypeUpdater(private val session: FirSession) : PlatformSupertypeUp if (anyFound || !hasExplicitSuperClass) { firClass.replaceSuperTypeRefs(newSuperTypeRefs) - firClass.transformSingle(jvmRecordUpdater, scopeSession) + firClass.transformDeclarations(jvmRecordUpdater, scopeSession) } } @@ -73,7 +73,7 @@ class JvmSupertypeUpdater(private val session: FirSession) : PlatformSupertypeUp } override fun transformRegularClass(regularClass: FirRegularClass, data: ScopeSession): FirStatement { - return regularClass.transformDeclarations(this, data) + return regularClass } override fun transformConstructor(constructor: FirConstructor, data: ScopeSession): FirStatement { diff --git a/compiler/testData/codegen/boxModernJdk/testsWithJava17/records/recordWithCompanion.fir.ir.txt b/compiler/testData/codegen/boxModernJdk/testsWithJava17/records/recordWithCompanion.fir.ir.txt index ef8af68d708..6a1397c33d1 100644 --- a/compiler/testData/codegen/boxModernJdk/testsWithJava17/records/recordWithCompanion.fir.ir.txt +++ b/compiler/testData/codegen/boxModernJdk/testsWithJava17/records/recordWithCompanion.fir.ir.txt @@ -23,7 +23,7 @@ FILE fqName: fileName:/recordWithCompanion.kt $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Tag.Companion CONSTRUCTOR visibility:private <> () returnType:.Tag.Companion [primary] BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'protected/*protected and package*/ constructor () declared in java.lang.Record' + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: