[FIR] DeprecationProvider: inline builder, fix named arguments, cosmetic

This commit is contained in:
Arseniy Terekhov
2022-08-17 11:15:40 +03:00
committed by teamcity
parent a80870bc8f
commit 539e5f82e2
7 changed files with 20 additions and 11 deletions
@@ -630,7 +630,7 @@ internal object CheckCallModifiers : CheckerStage() {
internal object CheckDeprecatedSinceKotlin : ResolutionStage() {
override suspend fun check(candidate: Candidate, callInfo: CallInfo, sink: CheckerSink, context: ResolutionContext) {
val symbol = candidate.symbol as? FirCallableSymbol<*> ?: return
val deprecation = symbol.getDeprecation(context.session.languageVersionSettings.apiVersion, callInfo.callSite)
val deprecation = symbol.getDeprecation(context.session, callInfo.callSite)
if (deprecation != null && deprecation.deprecationLevel == DeprecationLevelValue.HIDDEN) {
sink.yieldDiagnostic(HiddenCandidate)
}
@@ -124,7 +124,7 @@ class FirTypeResolverImpl(private val session: FirSession) : FirTypeResolver() {
diagnostic = ConeVisibilityError(symbol)
}
val deprecation = symbol.getDeprecation(session.languageVersionSettings.apiVersion, useSiteFile)
val deprecation = symbol.getDeprecation(session, useSiteFile)
if (deprecation != null && deprecation.deprecationLevel == DeprecationLevelValue.HIDDEN) {
symbolApplicability = minOf(CandidateApplicability.HIDDEN, symbolApplicability)
diagnostic = null