Remove a couple of unnecessary hasInterfaceType() checks

We call isInvalid() a few lines above, so the
interface type gets computed anyway.
This commit is contained in:
Hamish Knight
2019-11-12 07:23:52 -08:00
parent ed77b86c24
commit 2a75179849

View File

@@ -5274,10 +5274,6 @@ performMemberLookup(ConstraintKind constraintKind, DeclName memberName,
return;
}
// FIXME: Deal with broken recursion
if (!decl->hasInterfaceType())
return;
// Dig out the instance type and figure out what members of the instance type
// we are going to see.
auto baseTy = candidate.getBaseType();
@@ -5649,10 +5645,6 @@ performMemberLookup(ConstraintKind constraintKind, DeclName memberName,
return result;
}
// FIXME: Deal with broken recursion
if (!cand->hasInterfaceType())
continue;
result.addUnviable(getOverloadChoice(cand, /*isBridged=*/false,
/*isUnwrappedOptional=*/false),
MemberLookupResult::UR_Inaccessible);