Dependencies: member lookups in constraint systems are usually private.

This adds a new parameter to TypeChecker::lookupMember to specify when
something is known-private, which can then be passed along to
DeclContext::lookupQualified. This makes many of the existing member
lookup dependencies in the reference-dependencies.swift test correctly
count as private.

Swift SVN r23631
This commit is contained in:
Jordan Rose
2014-12-03 02:55:58 +00:00
parent 11fa7ca974
commit 02a286821f
8 changed files with 30 additions and 14 deletions

View File

@@ -199,7 +199,8 @@ LookupResult &ConstraintSystem::lookupMember(Type base, DeclName name) {
// Lookup the member.
MemberLookups[{base, name}] = None;
auto lookup = TC.lookupMember(base, name, DC);
auto lookup = TC.lookupMember(base, name, DC,
/*knownPrivate=*/isa<AbstractFunctionDecl>(DC));
auto &result = MemberLookups[{base, name}];
result = std::move(lookup);