Eliminate more "DynamicLookup" in favor of "AnyObject", this is the

bulk of finishing rdar://13327098.


Swift SVN r14653
This commit is contained in:
Chris Lattner
2014-03-04 22:15:46 +00:00
parent b0b08887e1
commit d758e0dfe3
38 changed files with 193 additions and 190 deletions

View File

@@ -1512,7 +1512,7 @@ ConstraintSystem::simplifyMemberConstraint(const Constraint &constraint) {
bool isDynamicLookup = false;
if (auto protoTy = instanceTy->getAs<ProtocolType>()) {
isDynamicLookup = protoTy->getDecl()->isSpecificProtocol(
KnownProtocolKind::DynamicLookup);
KnownProtocolKind::AnyObject);
}
// Introduce a new overload set to capture the choices.
@@ -1544,7 +1544,7 @@ ConstraintSystem::simplifyMemberConstraint(const Constraint &constraint) {
!result->isInstanceMember())
continue;
// If we're doing dynamic lookup into a metatype of DynamicLookup and we've
// If we're doing dynamic lookup into a metatype of AnyObject and we've
// found an instance member, ignore it.
if (isDynamicLookup && isMetatype && result->isInstanceMember()) {
// FIXME: Mark as 'unavailable' somehow.
@@ -1664,7 +1664,7 @@ ConstraintSystem::simplifyDynamicLookupConstraint(const Constraint &constraint){
if (auto protoTy = baseTy->getAs<ProtocolType>()) {
if (protoTy->getDecl()->isSpecificProtocol(
KnownProtocolKind::DynamicLookup))
KnownProtocolKind::AnyObject))
return SolutionKind::Solved;
}