[FIR] Remove useless generic parameter from deprecation utils

This commit is contained in:
Dmitriy Novozhilov
2021-07-09 10:17:55 +03:00
committed by teamcityserver
parent c50fe4e399
commit adc45fd3dd
2 changed files with 8 additions and 8 deletions
@@ -36,13 +36,13 @@ object FirDeprecationChecker : FirBasicExpressionChecker() {
reportDeprecationIfNeeded(expression.source, referencedFir, expression, context, reporter)
}
internal fun <T> reportDeprecationIfNeeded(
internal fun reportDeprecationIfNeeded(
source: FirSourceElement?,
referencedFir: T,
referencedFir: FirAnnotatedDeclaration,
callSite: FirElement?,
context: CheckerContext,
reporter: DiagnosticReporter
) where T : FirAnnotatedDeclaration {
) {
val deprecation = getWorstDeprecation(callSite, referencedFir, context) ?: return
val diagnostic = when (deprecation.level) {
DeprecationLevelValue.ERROR, DeprecationLevelValue.HIDDEN -> FirErrors.DEPRECATION_ERROR
@@ -51,9 +51,9 @@ object FirDeprecationChecker : FirBasicExpressionChecker() {
reporter.reportOn(source, diagnostic, referencedFir.symbol, deprecation.message ?: "", context)
}
private fun <T : FirAnnotatedDeclaration> getWorstDeprecation(
private fun getWorstDeprecation(
callSite: FirElement?,
fir: T,
fir: FirAnnotatedDeclaration,
context: CheckerContext
): Deprecation? {
val deprecationInfos = listOfNotNull(
@@ -65,4 +65,4 @@ object FirDeprecationChecker : FirBasicExpressionChecker() {
return deprecationInfos.maxOrNull()
}
}
}