AST: Refactor existential type accessors on TypeBase and CanType

This commit is contained in:
Slava Pestov
2017-04-03 22:06:23 -07:00
parent ab74f6b143
commit 37491e63ac
26 changed files with 144 additions and 188 deletions

View File

@@ -1177,11 +1177,11 @@ ConstraintSystem::matchExistentialTypes(Type type1, Type type2,
}
}
if (!type2->isAnyExistentialType())
if (!type2->isExistentialType())
return SolutionKind::Error;
SmallVector<ProtocolDecl *, 4> protocols;
type2->getAnyExistentialTypeProtocols(protocols);
type2->getExistentialTypeProtocols(protocols);
for (auto proto : protocols) {
switch (simplifyConformsToConstraint(type1, proto, kind, locator,