[FIR] Store expressions of receivers inside candidates instead of ReceiverValue

This is needed because of mutable nature of receiver values: implicit
  receiver values can be modified because of smartcasts, but in candidate
  we need to store snapshot of receiver in the form it was at the beginning
  of the resolution

^KT-58823 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-06-05 10:36:55 +03:00
committed by Space Team
parent b564260a33
commit 6409bf2fe8
26 changed files with 255 additions and 181 deletions
@@ -484,6 +484,7 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
value = "null"
isMutable = true
}
defaultFalse("isImplicit")
}
impl(thisReference, "FirImplicitThisReference") {
@@ -495,6 +496,7 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
default("boundSymbol") {
isMutable = false
}
defaultTrue("isImplicit")
}
impl(superReference, "FirExplicitSuperReference")
@@ -687,6 +687,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
+stringField("labelName", nullable = true)
+field("boundSymbol", firBasedSymbolType, "*", nullable = true, withReplace = true)
+intField("contextReceiverNumber", withReplace = true)
+booleanField("isImplicit")
}
typeRef.configure {