File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -6558,6 +6558,8 @@ bool ProtocolDecl::walkInheritedProtocols(
65586558}
65596559
65606560bool ProtocolDecl::inheritsFrom (const ProtocolDecl *super) const {
6561+ assert (super);
6562+
65616563 if (this == super)
65626564 return false ;
65636565
Original file line number Diff line number Diff line change @@ -165,6 +165,9 @@ bool IsActorRequest::evaluate(
165165 if (auto protocol = dyn_cast<ProtocolDecl>(nominal)) {
166166 auto &ctx = protocol->getASTContext ();
167167 auto *actorProtocol = ctx.getProtocol (KnownProtocolKind::Actor);
168+ if (!actorProtocol)
169+ return false ;
170+
168171 return (protocol == actorProtocol ||
169172 protocol->inheritsFrom (actorProtocol));
170173 }
Original file line number Diff line number Diff line change @@ -188,6 +188,9 @@ bool IsDistributedActorRequest::evaluate(
188188 if (auto protocol = dyn_cast<ProtocolDecl>(nominal)) {
189189 auto &ctx = protocol->getASTContext ();
190190 auto *distributedActorProtocol = ctx.getDistributedActorDecl ();
191+ if (!distributedActorProtocol)
192+ return false ;
193+
191194 return (protocol == distributedActorProtocol ||
192195 protocol->inheritsFrom (distributedActorProtocol));
193196 }
You can’t perform that action at this time.
0 commit comments