Port getInterfaceType() patterns in libSema

This commit is contained in:
Robert Widmann
2019-09-23 16:49:29 -07:00
parent ed18f47d05
commit f053f9c480
34 changed files with 162 additions and 291 deletions

View File

@@ -4696,7 +4696,8 @@ performMemberLookup(ConstraintKind constraintKind, DeclName memberName,
auto decl = candidate.getDecl();
// If the result is invalid, skip it.
TC.validateDecl(decl);
// FIXME(InterfaceTypeRequest): isInvalid() should be based on the interface type.
(void)decl->getInterfaceType();
if (decl->isInvalid()) {
result.markErrorAlreadyDiagnosed();
return;
@@ -5070,7 +5071,8 @@ performMemberLookup(ConstraintKind constraintKind, DeclName memberName,
auto *cand = entry.getValueDecl();
// If the result is invalid, skip it.
TC.validateDecl(cand);
// FIXME(InterfaceTypeRequest): isInvalid() should be based on the interface type.
(void)cand->getInterfaceType();
if (cand->isInvalid()) {
result.markErrorAlreadyDiagnosed();
return result;
@@ -7000,7 +7002,8 @@ ConstraintSystem::simplifyDynamicCallableApplicableFnConstraint(
// Record the 'dynamicallyCall` method overload set.
SmallVector<OverloadChoice, 4> choices;
for (auto candidate : candidates) {
TC.validateDecl(candidate);
// FIXME(InterfaceTypeRequest): isInvalid() should be based on the interface type.
(void)candidate->getInterfaceType();
if (candidate->isInvalid()) continue;
choices.push_back(
OverloadChoice(type2, candidate, FunctionRefKind::SingleApply));