mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface: Don't warn on name conflict when the alias workaround is enabled
This warning is designed to be an early report of name conflicts in swiftinterfaces caused by a type having the same name as a module. Make sure we silence this warning when the workaround -alias-module-names-in-module-interface is enabled. This is what we already do for -module-interface-preserve-types-as-written. rdar://132990400
This commit is contained in:
@@ -163,7 +163,8 @@ static void
|
||||
diagnoseDeclShadowsModule(ModuleInterfaceOptions const &Opts,
|
||||
TypeDecl *shadowingDecl, ModuleDecl *shadowedModule,
|
||||
ModuleDecl *brokenModule) {
|
||||
if (Opts.PreserveTypesAsWritten || shadowingDecl == shadowedModule)
|
||||
if (Opts.PreserveTypesAsWritten || Opts.AliasModuleNames ||
|
||||
shadowingDecl == shadowedModule)
|
||||
return;
|
||||
|
||||
shadowingDecl->diagnose(
|
||||
|
||||
Reference in New Issue
Block a user