We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 497336c commit 6580e50Copy full SHA for 6580e50
lib/AST/ASTVerifier.cpp
@@ -1128,11 +1128,10 @@ class Verifier : public ASTWalker {
1128
abort();
1129
}
1130
1131
- SmallVector<ProtocolDecl*, 1> protocols;
1132
- srcTy->getExistentialTypeProtocols(protocols);
1133
-
1134
- if (protocols.size() != 1
1135
- || !protocols[0]->isObjC()) {
+ auto layout = srcTy->getExistentialLayout();
+ if (layout.superclass ||
+ !layout.isObjC() ||
+ layout.getProtocols().size() != 1) {
1136
Out << "ProtocolMetatypeToObject with non-ObjC-protocol metatype:\n";
1137
E->print(Out);
1138
Out << "\n";
0 commit comments