In ModuleFile::lookupVisibleDecls(), if the caller requested scoped decls, don't return the all the top-level ones as well.

Swift SVN r18327
This commit is contained in:
Argyrios Kyrtzidis
2014-05-18 16:08:40 +00:00
parent 35d22e9ffb
commit 9a060c0de8

View File

@@ -988,6 +988,7 @@ void ModuleFile::lookupVisibleDecls(Module::AccessPathTy accessPath,
for (auto item : *iter)
consumer.foundDecl(cast<ValueDecl>(getDecl(item.second)),
DeclVisibilityKind::VisibleAtTopLevel);
return;
}
for (auto entry : TopLevelDecls->data()) {