From 86e9908aff8d771030b842d5cd4e5f0f953559b8 Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Wed, 12 Sep 2018 12:27:49 +0300 Subject: [PATCH] Improve framework name clash detection for top-level declarations --- .../kotlin/backend/konan/objcexport/ObjCExportNamer.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportNamer.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportNamer.kt index d0e29f27f93..c08270bdd90 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportNamer.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportNamer.kt @@ -407,7 +407,8 @@ private fun ObjCExportMapper.canBeInheritedBySameClass( second: CallableMemberDescriptor ): Boolean { if (this.isTopLevel(first) || this.isTopLevel(second)) { - return (first.containingDeclaration.fqNameSafe == second.containingDeclaration.fqNameSafe) + return this.isTopLevel(first) && this.isTopLevel(second) && + first.source.containingFile == second.source.containingFile } val firstClass = this.getClassIfCategory(first) ?: first.containingDeclaration as ClassDescriptor