mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Dependencies: Type lookups are private in constraint systems within functions.
This is the start of distinguishing qualified lookups within function bodies from qualified lookups in a function signature. Both of these use the function itself as the decl context, so we need to distinguish them manually. This particular commit doesn't change much because expressions don't often use TypeMember constraints. But it does help with for-loops! Swift SVN r23484
This commit is contained in:
@@ -2757,8 +2757,9 @@ ConstraintSystem::simplifyMemberConstraint(const Constraint &constraint) {
|
||||
|
||||
return SolutionKind::Error;
|
||||
}
|
||||
|
||||
auto lookup = TC.lookupMemberType(baseObjTy, name.getBaseName(), DC);
|
||||
|
||||
auto lookup = TC.lookupMemberType(baseObjTy, name.getBaseName(), DC,
|
||||
isa<AbstractFunctionDecl>(DC));
|
||||
if (!lookup) {
|
||||
// FIXME: Customize diagnostic to mention types.
|
||||
recordFailure(constraint.getLocator(), Failure::DoesNotHaveMember,
|
||||
|
||||
Reference in New Issue
Block a user