KtFe10SymbolInfoProvider: take annotation use-site target into account

This commit is contained in:
Mikhail Glukhikh
2022-05-20 15:49:30 +02:00
committed by teamcity
parent b783a87c25
commit 0373e3fdfe
@@ -44,6 +44,25 @@ internal class KtFe10SymbolInfoProvider(
}
override fun getDeprecation(symbol: KtSymbol, annotationUseSiteTarget: AnnotationUseSiteTarget?): DeprecationInfo? {
when (annotationUseSiteTarget) {
AnnotationUseSiteTarget.PROPERTY_GETTER -> {
if (symbol is KtPropertySymbol) {
return getDeprecation(symbol.getter ?: symbol)
}
}
AnnotationUseSiteTarget.PROPERTY_SETTER -> {
if (symbol is KtPropertySymbol) {
return getDeprecation(symbol.setter ?: symbol)
}
}
AnnotationUseSiteTarget.SETTER_PARAMETER -> {
if (symbol is KtPropertySymbol) {
return getDeprecation(symbol.setter?.parameter ?: symbol)
}
}
else -> {
}
}
return getDeprecation(symbol) // TODO
}