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(
6558
6558
}
6559
6559
6560
6560
bool ProtocolDecl::inheritsFrom (const ProtocolDecl *super) const {
6561
+ assert (super);
6562
+
6561
6563
if (this == super)
6562
6564
return false ;
6563
6565
Original file line number Diff line number Diff line change @@ -165,6 +165,9 @@ bool IsActorRequest::evaluate(
165
165
if (auto protocol = dyn_cast<ProtocolDecl>(nominal)) {
166
166
auto &ctx = protocol->getASTContext ();
167
167
auto *actorProtocol = ctx.getProtocol (KnownProtocolKind::Actor);
168
+ if (!actorProtocol)
169
+ return false ;
170
+
168
171
return (protocol == actorProtocol ||
169
172
protocol->inheritsFrom (actorProtocol));
170
173
}
Original file line number Diff line number Diff line change @@ -188,6 +188,9 @@ bool IsDistributedActorRequest::evaluate(
188
188
if (auto protocol = dyn_cast<ProtocolDecl>(nominal)) {
189
189
auto &ctx = protocol->getASTContext ();
190
190
auto *distributedActorProtocol = ctx.getDistributedActorDecl ();
191
+ if (!distributedActorProtocol)
192
+ return false ;
193
+
191
194
return (protocol == distributedActorProtocol ||
192
195
protocol->inheritsFrom (distributedActorProtocol));
193
196
}
You can’t perform that action at this time.
0 commit comments