diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirClassImpl.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirClassImpl.kt index 2104eb1d8152b..8090aa59d0928 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirClassImpl.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirClassImpl.kt @@ -53,7 +53,6 @@ internal class FirClassImpl( annotations.forEach { it.accept(visitor, data) } typeParameters.forEach { it.accept(visitor, data) } status.accept(visitor, data) - (declarations.firstOrNull { it is FirConstructorImpl } as? FirConstructorImpl)?.typeParameters?.forEach { it.accept(visitor, data) } declarations.forEach { it.accept(visitor, data) } superTypeRefs.forEach { it.accept(visitor, data) } controlFlowGraphReference.accept(visitor, data) @@ -63,7 +62,6 @@ internal class FirClassImpl( transformAnnotations(transformer, data) typeParameters.transformInplace(transformer, data) transformStatus(transformer, data) - (declarations.firstOrNull { it is FirConstructorImpl } as? FirConstructorImpl)?.typeParameters?.transformInplace(transformer, data) declarations.transformInplace(transformer, data) companionObject = declarations.asSequence().filterIsInstance().firstOrNull { it.status.isCompanion } superTypeRefs.transformInplace(transformer, data) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirConstructorImpl.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirConstructorImpl.kt index 42dac40bff64b..a0b2d3b6becc5 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirConstructorImpl.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirConstructorImpl.kt @@ -52,6 +52,7 @@ internal class FirConstructorImpl( override fun acceptChildren(visitor: FirVisitor, data: D) { returnTypeRef.accept(visitor, data) receiverTypeRef?.accept(visitor, data) + typeParameters.forEach { it.accept(visitor, data) } controlFlowGraphReference.accept(visitor, data) valueParameters.forEach { it.accept(visitor, data) } status.accept(visitor, data) @@ -63,6 +64,7 @@ internal class FirConstructorImpl( override fun transformChildren(transformer: FirTransformer, data: D): FirConstructorImpl { transformReturnTypeRef(transformer, data) transformReceiverTypeRef(transformer, data) + typeParameters.transformInplace(transformer, data) transformControlFlowGraphReference(transformer, data) transformValueParameters(transformer, data) transformStatus(transformer, data) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirPrimaryConstructor.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirPrimaryConstructor.kt index d08c85324cbf6..622e800bda70b 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirPrimaryConstructor.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirPrimaryConstructor.kt @@ -52,6 +52,7 @@ internal class FirPrimaryConstructor( override fun acceptChildren(visitor: FirVisitor, data: D) { returnTypeRef.accept(visitor, data) receiverTypeRef?.accept(visitor, data) + typeParameters.forEach { it.accept(visitor, data) } controlFlowGraphReference.accept(visitor, data) valueParameters.forEach { it.accept(visitor, data) } status.accept(visitor, data) @@ -63,6 +64,7 @@ internal class FirPrimaryConstructor( override fun transformChildren(transformer: FirTransformer, data: D): FirPrimaryConstructor { transformReturnTypeRef(transformer, data) transformReceiverTypeRef(transformer, data) + typeParameters.transformInplace(transformer, data) transformControlFlowGraphReference(transformer, data) transformValueParameters(transformer, data) transformStatus(transformer, data) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirSealedClassImpl.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirSealedClassImpl.kt index fc4a2e1c5f7c0..cf6c3956b27a9 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirSealedClassImpl.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirSealedClassImpl.kt @@ -56,7 +56,6 @@ internal class FirSealedClassImpl( annotations.forEach { it.accept(visitor, data) } typeParameters.forEach { it.accept(visitor, data) } status.accept(visitor, data) - (declarations.firstOrNull { it is FirConstructorImpl } as? FirConstructorImpl)?.typeParameters?.forEach { it.accept(visitor, data) } declarations.forEach { it.accept(visitor, data) } superTypeRefs.forEach { it.accept(visitor, data) } controlFlowGraphReference.accept(visitor, data) @@ -66,7 +65,6 @@ internal class FirSealedClassImpl( transformAnnotations(transformer, data) typeParameters.transformInplace(transformer, data) transformStatus(transformer, data) - (declarations.firstOrNull { it is FirConstructorImpl } as? FirConstructorImpl)?.typeParameters?.transformInplace(transformer, data) declarations.transformInplace(transformer, data) companionObject = declarations.asSequence().filterIsInstance().firstOrNull { it.status.isCompanion } superTypeRefs.transformInplace(transformer, data) diff --git a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/ImplementationConfigurator.kt b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/ImplementationConfigurator.kt index 5ab8bdbfe9db1..1a663b8b9b8de 100644 --- a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/ImplementationConfigurator.kt +++ b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/ImplementationConfigurator.kt @@ -19,16 +19,10 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator() private fun configure() = with(FirTreeBuilder) { impl(constructor) { defaultFalse("isPrimary", withGetter = true) - default("typeParameters") { - needAcceptAndTransform = false - } } impl(constructor, "FirPrimaryConstructor") { defaultTrue("isPrimary", withGetter = true) - default("typeParameters") { - needAcceptAndTransform = false - } } impl(typeParameterRef, "FirOuterClassTypeParameterRef") diff --git a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/implementation.kt b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/implementation.kt index c012b6b573ed1..6144b6395b3c0 100644 --- a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/implementation.kt +++ b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/implementation.kt @@ -147,9 +147,6 @@ fun SmartPrinter.printImplementation(implementation: Implementation) { } else -> { - if (type in setOf("FirClassImpl", "FirSealedClassImpl") && field.name == "declarations") { - println("(declarations.firstOrNull { it is FirConstructorImpl } as? FirConstructorImpl)?.typeParameters?.forEach { it.accept(visitor, data) }") - } if (type == "FirWhenExpressionImpl" && field.name == "subject") { println( """ @@ -221,11 +218,6 @@ fun SmartPrinter.printImplementation(implementation: Implementation) { field.name in setOf("dispatchReceiver", "extensionReceiver") -> {} - type in setOf("FirClassImpl", "FirSealedClassImpl") && field.name == "declarations" -> { - println("(declarations.firstOrNull { it is FirConstructorImpl } as? FirConstructorImpl)?.typeParameters?.transformInplace(transformer, data)") - println("declarations.transformInplace(transformer, data)") - } - field.name == "companionObject" -> { println("companionObject = declarations.asSequence().filterIsInstance().firstOrNull { it.status.isCompanion }") }