Sema: A couple of recursion-breaking hacks

This commit is contained in:
Slava Pestov
2017-06-06 02:04:16 -07:00
parent d5e54b88df
commit c152fee9f8
6 changed files with 26 additions and 8 deletions

View File

@@ -599,6 +599,10 @@ ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol,
// existential's list of conformances and the existential conforms to
// itself.
if (type->isExistentialType()) {
// FIXME: Recursion break.
if (!protocol->hasValidSignature())
return None;
// If the existential type cannot be represented or the protocol does not
// conform to itself, there's no point in looking further.
if (!protocol->existentialConformsToSelf() ||