From a6b8f181731321154b473d595718efd6f87ad88c Mon Sep 17 00:00:00 2001 From: Maxim Grankin Date: Sat, 30 Jul 2022 13:44:33 +0800 Subject: [PATCH] BodyResolveContext hasAnnotation --- .../resolve/transformers/body/resolve/BodyResolveContext.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt index 6ffb5c546018b7..5e6951c8c5f671 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt @@ -449,7 +449,10 @@ class BodyResolveContext( val typeParameterScope = (owner as? FirRegularClass)?.typeParameterScope() val selfTypeScope: FirSelfTypeScope? = - owner.annotations.find { it.classId == StandardClassIds.Annotations.Self }?.let { FirSelfTypeScope(owner) } + if (owner.hasAnnotation(StandardClassIds.Annotations.Self)) { + FirSelfTypeScope(owner) + } else + null val forMembersResolution = staticsAndCompanion