[FIR] Use correct source for implicit this receiver

#KT-57489 Fixed
#KT-56139 Fixed
#KT-56755 Fixed
This commit is contained in:
Ivan Kylchik
2023-05-10 12:51:47 +02:00
committed by Space Team
parent ab03cb2357
commit 8f88f08573
23 changed files with 286 additions and 36 deletions
@@ -257,6 +257,7 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
builder(thisReceiverExpression) {
parents += qualifiedAccessExpressionBuilder
default("isImplicit", "false")
withCopy()
}
builder(thisReference, "FirExplicitThisReference") {
@@ -562,7 +562,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
smartCastExpression.configure {
+typeRefField
+field("originalExpression", expression).withTransform()
+field("originalExpression", expression, withReplace = true).withTransform()
+field("typesFromSmartCast", "Collection<ConeKotlinType>", null, customType = coneKotlinTypeType)
+field("smartcastType", typeRef)
+field("smartcastTypeWithoutNullableNothing", typeRef, nullable = true)