Merge pull request #35904 from beccadax/go-back-to-the-shadow

Warn about module name shadowing in interfaces
This commit is contained in:
Becca (née Brent) Royal-Gordon
2021-02-16 15:32:41 -08:00
committed by GitHub
6 changed files with 165 additions and 17 deletions

View File

@@ -2051,6 +2051,8 @@ bool SourceFile::isImportedImplementationOnly(const ModuleDecl *module) const {
}
bool ModuleDecl::isImportedImplementationOnly(const ModuleDecl *module) const {
if (module == this) return false;
auto &imports = getASTContext().getImportCache();
// Look through non-implementation-only imports to see if module is imported