[FIR] Add excessive delegated constructors to FIR tree
^KTIJ-25453 fixed Merge-request: KT-MR-10379 Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
This commit is contained in:
+1
@@ -129,6 +129,7 @@ object FirTreeBuilder : AbstractFirTreeBuilder() {
|
||||
val integerLiteralOperatorCall by element(Expression, functionCall)
|
||||
val implicitInvokeCall by element(Expression, functionCall)
|
||||
val delegatedConstructorCall by element(Expression, resolvable, call, contextReceiverArgumentListOwner)
|
||||
val multiDelegatedConstructorCall by element(Expression, delegatedConstructorCall)
|
||||
val componentCall by element(Expression, functionCall)
|
||||
val callableReferenceAccess by element(Expression, qualifiedAccessExpression)
|
||||
val thisReceiverExpression by element(Expression, qualifiedAccessExpression)
|
||||
|
||||
+40
@@ -129,6 +129,46 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
useTypes(explicitThisReferenceType, explicitSuperReferenceType)
|
||||
}
|
||||
|
||||
impl(multiDelegatedConstructorCall) {
|
||||
default("source") {
|
||||
value = "delegatedConstructorCalls.last().source"
|
||||
withGetter = true
|
||||
}
|
||||
default("annotations") {
|
||||
value = "delegatedConstructorCalls.last().annotations"
|
||||
withGetter = true
|
||||
}
|
||||
default("argumentList") {
|
||||
value = "delegatedConstructorCalls.last().argumentList"
|
||||
withGetter = true
|
||||
}
|
||||
default("contextReceiverArguments") {
|
||||
value = "delegatedConstructorCalls.last().contextReceiverArguments"
|
||||
withGetter = true
|
||||
}
|
||||
default("constructedTypeRef") {
|
||||
value = "delegatedConstructorCalls.last().constructedTypeRef"
|
||||
withGetter = true
|
||||
}
|
||||
default("dispatchReceiver") {
|
||||
value = "delegatedConstructorCalls.last().dispatchReceiver"
|
||||
withGetter = true
|
||||
}
|
||||
default("calleeReference") {
|
||||
value = "delegatedConstructorCalls.last().calleeReference"
|
||||
withGetter = true
|
||||
}
|
||||
default("isThis") {
|
||||
value = "delegatedConstructorCalls.last().isThis"
|
||||
withGetter = true
|
||||
}
|
||||
default("isSuper") {
|
||||
value = "!isThis"
|
||||
withGetter = true
|
||||
}
|
||||
publicImplementation()
|
||||
}
|
||||
|
||||
impl(delegatedConstructorCall, "FirLazyDelegatedConstructorCall") {
|
||||
val error = """error("FirLazyDelegatedConstructorCall should be calculated before accessing")"""
|
||||
default("source") {
|
||||
|
||||
+4
@@ -418,6 +418,10 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
generateBooleanFields("this", "super")
|
||||
}
|
||||
|
||||
multiDelegatedConstructorCall.configure {
|
||||
+fieldList("delegatedConstructorCalls", delegatedConstructorCall, withReplace = true).withTransform()
|
||||
}
|
||||
|
||||
valueParameter.configure {
|
||||
+symbol("FirValueParameterSymbol")
|
||||
+field("defaultValue", expression, nullable = true, withReplace = true)
|
||||
|
||||
Reference in New Issue
Block a user