Skip to content

Commit ea1307c

Browse files
authored
Merge pull request swiftlang#12190 from graydon/objc-protocols-can-always-be-existential
[ProtocolDecl] Avoid getMembers(), imported ObjC protocols can always be existential.
2 parents 03ecfe2 + 880c1b8 commit ea1307c

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
@@ -3380,6 +3380,10 @@ bool ProtocolDecl::existentialTypeSupportedSlow(LazyResolver *resolver) {
33803380
ProtocolDeclBits.ExistentialTypeSupportedValid = true;
33813381
ProtocolDeclBits.ExistentialTypeSupported = true;
33823382

3383+
// ObjC protocols can always be existential.
3384+
if (isObjC())
3385+
return true;
3386+
33833387
// Resolve the protocol's type.
33843388
if (resolver && !hasInterfaceType())
33853389
resolver->resolveDeclSignature(this);

0 commit comments

Comments
 (0)