[FIR] Check for setter visibility in resolution stage

This is required for the following commit where candidates from the
original scope in presence of smart cast will not be ignored if they're
the same symbol.
This commit is contained in:
Kirill Rakhman
2023-12-18 11:42:29 +01:00
committed by Space Team
parent 737b286d5c
commit 5186ba80e2
15 changed files with 44 additions and 76 deletions
@@ -86,6 +86,8 @@ object HiddenCandidate : ResolutionDiagnostic(HIDDEN)
object VisibilityError : ResolutionDiagnostic(K2_VISIBILITY_ERROR)
object SetterVisibilityError : ResolutionDiagnostic(K2_VISIBILITY_ERROR)
object ResolvedWithLowPriority : ResolutionDiagnostic(RESOLVED_LOW_PRIORITY)
object ResolvedWithSynthetic : ResolutionDiagnostic(K2_SYNTHETIC_RESOLVED)
@@ -111,6 +111,12 @@ open class ConeVisibilityError(
override val reason: String get() = "HIDDEN: ${describeSymbol(symbol)} is invisible"
}
open class ConeSetterVisibilityError(
override val symbol: FirPropertySymbol
) : ConeDiagnosticWithSymbol<FirBasedSymbol<*>> {
override val reason: String get() = "HIDDEN SETTER: ${describeSymbol(symbol)} is invisible"
}
class ConeTypeVisibilityError(
symbol: FirBasedSymbol<*>,
val smallestUnresolvablePrefix: List<FirQualifierPart>,