[FIR] Make constructor delegate lazy in RawFirBuilder
Fifth step for ^KT-52615 Merge-request: KT-MR-7860 Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
This commit is contained in:
+1
-1
@@ -190,7 +190,7 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
|
||||
defaultNull("label")
|
||||
}
|
||||
|
||||
builder(delegatedConstructorCall) {
|
||||
builder(delegatedConstructorCall, type = "FirDelegatedConstructorCallImpl") {
|
||||
parents += callBuilder
|
||||
default("argumentList") {
|
||||
value = "FirEmptyArgumentList"
|
||||
|
||||
+29
@@ -128,6 +128,35 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
useTypes(explicitThisReferenceType, explicitSuperReferenceType)
|
||||
}
|
||||
|
||||
impl(delegatedConstructorCall, "FirLazyDelegatedConstructorCall") {
|
||||
val error = """error("FirLazyDelegatedConstructorCall should be calculated before accessing")"""
|
||||
default("source") {
|
||||
value = error
|
||||
withGetter = true
|
||||
}
|
||||
default("annotations") {
|
||||
value = error
|
||||
withGetter = true
|
||||
}
|
||||
default("argumentList") {
|
||||
value = error
|
||||
withGetter = true
|
||||
}
|
||||
default("contextReceiverArguments") {
|
||||
value = error
|
||||
withGetter = true
|
||||
}
|
||||
default("dispatchReceiver") {
|
||||
value = error
|
||||
withGetter = true
|
||||
}
|
||||
default("isSuper") {
|
||||
value = "!isThis"
|
||||
withGetter = true
|
||||
}
|
||||
publicImplementation()
|
||||
}
|
||||
|
||||
impl(expression, "FirElseIfTrueCondition") {
|
||||
defaultTypeRefWithSource("FirImplicitBooleanTypeRef")
|
||||
useTypes(implicitBooleanTypeRefType)
|
||||
|
||||
+1
-1
@@ -379,7 +379,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
constructor.configure {
|
||||
+annotations
|
||||
+symbol("FirConstructorSymbol")
|
||||
+field("delegatedConstructor", delegatedConstructorCall, nullable = true).withTransform()
|
||||
+field("delegatedConstructor", delegatedConstructorCall, nullable = true, withReplace = true).withTransform()
|
||||
+body(nullable = true)
|
||||
+booleanField("isPrimary")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user