Improve framework name clash detection for top-level declarations

This commit is contained in:
Svyatoslav Scherbina
2018-09-12 12:27:49 +03:00
committed by SvyatoslavScherbina
parent 29748e59df
commit 86e9908aff
@@ -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