Merge pull request #4579 from aleksgapp/sr-2209-access-scope

[SR-2209] Add real AccessScope type.
This commit is contained in:
Jordan Rose
2016-11-11 11:16:12 -08:00
committed by GitHub
15 changed files with 454 additions and 402 deletions

View File

@@ -15,6 +15,7 @@
//===----------------------------------------------------------------------===//
#include "swift/AST/Module.h"
#include "swift/AST/AccessScope.h"
#include "swift/AST/AST.h"
#include "swift/AST/ASTPrinter.h"
#include "swift/AST/ASTScope.h"
@@ -428,8 +429,8 @@ void Module::lookupMember(SmallVectorImpl<ValueDecl*> &results,
return VD->getModuleContext() == this;
});
const DeclContext *accessScope = nominal->getFormalAccessScope();
if (accessScope && !accessScope->isModuleContext())
auto AS = nominal->getFormalAccessScope();
if (AS.isPrivate() || AS.isFileScope())
alreadyInPrivateContext = true;
break;