mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These functions don't need a TypeChecker
This commit is contained in:
@@ -5218,7 +5218,7 @@ performMemberLookup(ConstraintKind constraintKind, DeclName memberName,
|
||||
if (memberLocator &&
|
||||
::hasDynamicMemberLookupAttribute(instanceTy,
|
||||
DynamicMemberLookupCache) &&
|
||||
isValidKeyPathDynamicMemberLookup(subscript, TC)) {
|
||||
isValidKeyPathDynamicMemberLookup(subscript)) {
|
||||
auto info = getArgumentInfo(memberLocator);
|
||||
|
||||
if (!(info && info->Labels.size() == 1 &&
|
||||
@@ -5324,9 +5324,9 @@ performMemberLookup(ConstraintKind constraintKind, DeclName memberName,
|
||||
auto name = memberName.getBaseIdentifier();
|
||||
for (const auto &candidate : subscripts.ViableCandidates) {
|
||||
auto *SD = cast<SubscriptDecl>(candidate.getDecl());
|
||||
bool isKeyPathBased = isValidKeyPathDynamicMemberLookup(SD, TC);
|
||||
bool isKeyPathBased = isValidKeyPathDynamicMemberLookup(SD);
|
||||
|
||||
if (isValidStringDynamicMemberLookup(SD, DC, TC) || isKeyPathBased)
|
||||
if (isValidStringDynamicMemberLookup(SD, DC) || isKeyPathBased)
|
||||
result.addViable(OverloadChoice::getDynamicMemberLookup(
|
||||
baseTy, SD, name, isKeyPathBased));
|
||||
}
|
||||
@@ -5335,7 +5335,7 @@ performMemberLookup(ConstraintKind constraintKind, DeclName memberName,
|
||||
auto *SD =
|
||||
cast<SubscriptDecl>(subscripts.UnviableCandidates[index].getDecl());
|
||||
auto choice = OverloadChoice::getDynamicMemberLookup(
|
||||
baseTy, SD, name, isValidKeyPathDynamicMemberLookup(SD, TC));
|
||||
baseTy, SD, name, isValidKeyPathDynamicMemberLookup(SD));
|
||||
result.addUnviable(choice, subscripts.UnviableReasons[index]);
|
||||
}
|
||||
}
|
||||
@@ -7094,7 +7094,7 @@ lookupDynamicCallableMethods(Type type, ConstraintSystem &CS,
|
||||
auto candidates = matches.ViableCandidates;
|
||||
auto filter = [&](OverloadChoice choice) {
|
||||
auto cand = cast<FuncDecl>(choice.getDecl());
|
||||
return !isValidDynamicCallableMethod(cand, decl, CS.TC, hasKeywordArgs);
|
||||
return !isValidDynamicCallableMethod(cand, decl, hasKeywordArgs);
|
||||
};
|
||||
candidates.erase(
|
||||
std::remove_if(candidates.begin(), candidates.end(), filter),
|
||||
|
||||
Reference in New Issue
Block a user