Skip to content

Commit

Permalink
Add hasAnnotation
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim092001 committed Jul 30, 2022
1 parent efc9579 commit e8a9ec9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef
import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef
import org.jetbrains.kotlin.fir.types.impl.ConeTypeParameterTypeImpl
import org.jetbrains.kotlin.name.SpecialNames.SELF_TYPE
import org.jetbrains.kotlin.name.StandardClassIds
import org.jetbrains.kotlin.types.Variance

class FirTypeResolveProcessor(
Expand Down Expand Up @@ -247,7 +248,7 @@ open class FirTypeResolveTransformer(
withScopeCleanup {
firClass.transformAnnotations(this, null)

val isSelf = firClass.annotations.any { it.classId == StandardClassIds.Annotations.Self }
val isSelf = firClass.hasAnnotation(StandardClassIds.Annotations.Self)

val params = firClass.typeParameters
if (params is MutableList && isSelf) {
Expand Down

0 comments on commit e8a9ec9

Please sign in to comment.