Skip to content

Commit 76a55e2

Browse files
committed
BodyResolveContext hasAnnotation
1 parent 73911b6 commit 76a55e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,10 @@ class BodyResolveContext(
446446

447447
val typeParameterScope = (owner as? FirRegularClass)?.typeParameterScope()
448448
val selfTypeScope: FirSelfTypeScope? =
449-
owner.annotations.find { it.classId == StandardClassIds.Annotations.Self }?.let { FirSelfTypeScope(owner) }
449+
if (owner.hasAnnotation(StandardClassIds.Annotations.Self)) {
450+
FirSelfTypeScope(owner)
451+
} else
452+
null
450453

451454
val forMembersResolution =
452455
staticsAndCompanion

0 commit comments

Comments
 (0)