mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: A couple of recursion-breaking hacks
This commit is contained in:
@@ -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() ||
|
||||
|
||||
Reference in New Issue
Block a user