mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
Merge pull request #88447 from dduan/dd/ignore-macro-in-equalified-imports
Qualified import for macro has not been implemented. Until then, ignore macros in lookup so that a macro and a struct sharing the same name won't cause ambiguity. rdar://174526734
This commit is contained in:
@@ -606,6 +606,10 @@ void ModuleFile::getImportDecls(SmallVectorImpl<Decl *> &Results) {
|
||||
TopLevelModule->lookupQualified(
|
||||
TopLevelModule, DeclNameRef(ScopeID),
|
||||
SourceLoc(), NL_QualifiedDefault, Decls);
|
||||
// Skip macro until `import macro` is implemented.
|
||||
llvm::erase_if(Decls, [](ValueDecl *VD) {
|
||||
return isa<MacroDecl>(VD);
|
||||
});
|
||||
std::optional<ImportKind> FoundKind =
|
||||
ImportDecl::findBestImportKind(Decls);
|
||||
assert(FoundKind.has_value() &&
|
||||
|
||||
Reference in New Issue
Block a user