Process FirErrorResolvedQualifiers in KtFirReferenceShortener
Also, add `classId` default value to the `FirErrorResolvedQualifierImpl` just as in `FirResolvedQualifierImpl` - it seemed inconsistent that we can have a class symbol in error-resolved qualifier, but the `classId` field will be `null`
This commit is contained in:
committed by
TeamCityServer
parent
f6e49776f8
commit
08e9a3bc4f
+15
-8
@@ -276,14 +276,7 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
|
||||
impl(resolvedQualifier) {
|
||||
isMutable("packageFqName", "relativeClassFqName", "isNullableLHSForCallableReference")
|
||||
default("classId") {
|
||||
value = """
|
||||
|relativeClassFqName?.let {
|
||||
| ClassId(packageFqName, it, false)
|
||||
|}
|
||||
""".trimMargin()
|
||||
withGetter = true
|
||||
}
|
||||
defaultClassIdFromRelativeClassName()
|
||||
}
|
||||
|
||||
impl(resolvedReifiedParameterReference)
|
||||
@@ -495,6 +488,7 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
|
||||
impl(errorResolvedQualifier) {
|
||||
defaultFalse("resolvedToCompanionObject", withGetter = true)
|
||||
defaultClassIdFromRelativeClassName()
|
||||
}
|
||||
|
||||
noImpl(userTypeRef)
|
||||
@@ -574,4 +568,17 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
useTypes(implicitTypeRefType)
|
||||
}
|
||||
}
|
||||
|
||||
private fun ImplementationContext.defaultClassIdFromRelativeClassName() {
|
||||
default("classId") {
|
||||
value = """
|
||||
|relativeClassFqName?.let {
|
||||
| ClassId(packageFqName, it, false)
|
||||
|}
|
||||
""".trimMargin()
|
||||
withGetter = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user