[FIR] Set source of smart-cast expressions automatically
#KT-55835
This commit is contained in:
committed by
Space Team
parent
9288a96f6d
commit
91dad7b952
+4
@@ -452,6 +452,10 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
value = "smartcastStability == SmartcastStability.STABLE_VALUE"
|
||||
withGetter = true
|
||||
}
|
||||
default("source") {
|
||||
value = "originalExpression.source?.fakeElement(KtFakeSourceElementKind.SmartCastExpression)"
|
||||
}
|
||||
useTypes(fakeElementImport, fakeSourceElementKindImport)
|
||||
}
|
||||
|
||||
impl(resolvedNamedReference)
|
||||
|
||||
+3
@@ -15,3 +15,6 @@ val resolvedDeclarationStatusImport = ArbitraryImportable("org.jetbrains.kotlin.
|
||||
val buildResolvedTypeRefImport = ArbitraryImportable("org.jetbrains.kotlin.fir.types.builder", "buildResolvedTypeRef")
|
||||
val constructClassTypeImport = ArbitraryImportable("org.jetbrains.kotlin.fir.types", "constructClassType")
|
||||
val toLookupTagImport = ArbitraryImportable("org.jetbrains.kotlin.fir.types", "toLookupTag")
|
||||
|
||||
val fakeSourceElementKindImport = ArbitraryImportable("org.jetbrains.kotlin", "KtFakeSourceElementKind")
|
||||
val fakeElementImport = ArbitraryImportable("org.jetbrains.kotlin", "fakeElement")
|
||||
|
||||
Reference in New Issue
Block a user