[FIR] Rename FirAnnotation.classId to unexpandedClassId

This makes the eye catch each such thing in the source.
OptIn isn't that catchy, plus it may be declared
for the whole file, so noticing may be harder
This commit is contained in:
Nikolay Lunyak
2023-01-10 20:46:48 +02:00
committed by Space Team
parent cf73d59e29
commit 0c86294ca4
5 changed files with 9 additions and 9 deletions
@@ -190,12 +190,12 @@ private fun List<FirAnnotation>.extractDeprecationAnnotationInfoPerUseSite(
return buildDeprecationAnnotationInfoPerUseSiteStorage {
for ((deprecated, fromJavaAnnotation) in annotations) {
if (deprecated.classId == StandardClassIds.Annotations.SinceKotlin) {
if (deprecated.unexpandedClassId == StandardClassIds.Annotations.SinceKotlin) {
val sinceKotlinSingleArgument = deprecated.findArgumentByName(ParameterNames.sinceKotlinVersion)
val apiVersion = ((sinceKotlinSingleArgument as? FirConstExpression<*>)?.value as? String)
?.let(ApiVersion.Companion::parse) ?: continue
val wasExperimental = this@extractDeprecationAnnotationInfoPerUseSite.any {
it.classId == StandardClassIds.Annotations.WasExperimental
it.unexpandedClassId == StandardClassIds.Annotations.WasExperimental
}
if (!wasExperimental) {
add(deprecated.useSiteTarget, SinceKotlinInfo(apiVersion))