Skip to content

Commit a6b8f18

Browse files
committed
BodyResolveContext hasAnnotation
1 parent 945cafa commit a6b8f18

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
@@ -449,7 +449,10 @@ class BodyResolveContext(
449449

450450
val typeParameterScope = (owner as? FirRegularClass)?.typeParameterScope()
451451
val selfTypeScope: FirSelfTypeScope? =
452-
owner.annotations.find { it.classId == StandardClassIds.Annotations.Self }?.let { FirSelfTypeScope(owner) }
452+
if (owner.hasAnnotation(StandardClassIds.Annotations.Self)) {
453+
FirSelfTypeScope(owner)
454+
} else
455+
null
453456

454457
val forMembersResolution =
455458
staticsAndCompanion

0 commit comments

Comments
 (0)