Don't perform additional lookups for DeprecatedSinceKotlin annotation
There is no need to check it as `DeprecatedSinceKotlin` can be used only along with `Deprecated` annotation
This commit is contained in:
@@ -370,7 +370,7 @@ internal fun KtModifierListOwner.isDeprecated(support: KtUltraLightSupport? = nu
|
||||
|
||||
val fqName = toQualifiedName(typeElement) ?: continue
|
||||
|
||||
if (fqName == deprecatedFqName || fqName == KotlinBuiltIns.FQ_NAMES.deprecatedSinceKotlin) return true
|
||||
if (fqName == deprecatedFqName) return true
|
||||
if (fqName.asString() == deprecatedName) return true
|
||||
}
|
||||
|
||||
|
||||
@@ -178,8 +178,7 @@ public class KtPsiUtil {
|
||||
List<KtAnnotationEntry> annotationEntries = modifierList.getAnnotationEntries();
|
||||
for (KtAnnotationEntry annotation : annotationEntries) {
|
||||
Name shortName = annotation.getShortName();
|
||||
if (KotlinBuiltIns.FQ_NAMES.deprecated.shortName().equals(shortName) ||
|
||||
KotlinBuiltIns.FQ_NAMES.deprecatedSinceKotlin.shortName().equals(shortName)) {
|
||||
if (KotlinBuiltIns.FQ_NAMES.deprecated.shortName().equals(shortName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user