diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ObjCInterop.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ObjCInterop.kt index 1dea177f2c8..5c9bfe002e8 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ObjCInterop.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ObjCInterop.kt @@ -62,7 +62,7 @@ fun ClassDescriptor.isExternalObjCClass(): Boolean = this.isObjCClass() && it.annotations.findAnnotation(externalObjCClassFqName) != null } fun IrClass.isExternalObjCClass(): Boolean = this.isObjCClass() && - (this as IrDeclaration).parentDeclarationsWithSelf.filterIsInstance().any { + this.parentDeclarationsWithSelf.filterIsInstance().any { it.annotations.hasAnnotation(externalObjCClassFqName) }