[FIR] Make anonymous initializer lazy in RawFirBuilder
Fourth step for KT-52615 Merge-request: KT-MR-7798 Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
This commit is contained in:
@@ -40,5 +40,7 @@ abstract class FirAnonymousInitializer : FirDeclaration(), FirControlFlowGraphOw
|
||||
|
||||
abstract override fun replaceControlFlowGraphReference(newControlFlowGraphReference: FirControlFlowGraphReference?)
|
||||
|
||||
abstract fun replaceBody(newBody: FirBlock?)
|
||||
|
||||
abstract override fun <D> transformAnnotations(transformer: FirTransformer<D>, data: D): FirAnonymousInitializer
|
||||
}
|
||||
|
||||
+4
@@ -63,4 +63,8 @@ internal class FirAnonymousInitializerImpl(
|
||||
override fun replaceControlFlowGraphReference(newControlFlowGraphReference: FirControlFlowGraphReference?) {
|
||||
controlFlowGraphReference = newControlFlowGraphReference
|
||||
}
|
||||
|
||||
override fun replaceBody(newBody: FirBlock?) {
|
||||
body = newBody
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -437,7 +437,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
}
|
||||
|
||||
anonymousInitializer.configure {
|
||||
+body(nullable = true)
|
||||
+body(nullable = true, withReplace = true)
|
||||
+symbol("FirAnonymousInitializerSymbol")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user