Skip to content

Commit 880c1b8

Browse files
committed
[ProtocolDecl] Avoid getMembers(), imported ObjC protocols can always be existential.
1 parent b954f99 commit 880c1b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/AST/Decl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,6 +3310,10 @@ bool ProtocolDecl::existentialTypeSupportedSlow(LazyResolver *resolver) {
33103310
ProtocolDeclBits.ExistentialTypeSupportedValid = true;
33113311
ProtocolDeclBits.ExistentialTypeSupported = true;
33123312

3313+
// ObjC protocols can always be existential.
3314+
if (isObjC())
3315+
return true;
3316+
33133317
// Resolve the protocol's type.
33143318
if (resolver && !hasInterfaceType())
33153319
resolver->resolveDeclSignature(this);

0 commit comments

Comments
 (0)