mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SE-0111] Track function reference kinds in member references.
Extend the handling of function reference kinds to member references (e.g., x.f), and therefore the logic for stripping argument labels. We appear to be stripping argument labels from all of the places where it is required.
This commit is contained in:
@@ -2220,7 +2220,8 @@ bool FailureDiagnosis::diagnoseGeneralMemberFailure(Constraint *constraint) {
|
||||
|
||||
MemberLookupResult result =
|
||||
CS->performMemberLookup(constraint->getKind(), constraint->getMember(),
|
||||
baseTy, constraint->getLocator(),
|
||||
baseTy, constraint->getFunctionRefKind(),
|
||||
constraint->getLocator(),
|
||||
/*includeInaccessibleMembers*/true);
|
||||
|
||||
switch (result.OverallResult) {
|
||||
@@ -4535,7 +4536,7 @@ bool FailureDiagnosis::visitSubscriptExpr(SubscriptExpr *SE) {
|
||||
|
||||
MemberLookupResult result =
|
||||
CS->performMemberLookup(ConstraintKind::ValueMember, subscriptName,
|
||||
baseType, locator,
|
||||
baseType, FunctionRefKind::DoubleApply, locator,
|
||||
/*includeInaccessibleMembers*/true);
|
||||
|
||||
|
||||
@@ -5716,7 +5717,9 @@ bool FailureDiagnosis::visitUnresolvedMemberExpr(UnresolvedMemberExpr *E) {
|
||||
MemberLookupResult result =
|
||||
CS->performMemberLookup(memberConstraint->getKind(),
|
||||
memberConstraint->getMember(),
|
||||
baseObjTy, memberConstraint->getLocator(),
|
||||
baseObjTy,
|
||||
memberConstraint->getFunctionRefKind(),
|
||||
memberConstraint->getLocator(),
|
||||
/*includeInaccessibleMembers*/true);
|
||||
|
||||
switch (result.OverallResult) {
|
||||
|
||||
Reference in New Issue
Block a user