[FIR] Fix obsolete transforms & visit consistency
This commit is contained in:
-6
@@ -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")
|
||||
|
||||
-8
@@ -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<FirRegularClass>().firstOrNull { it.status.isCompanion }")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user