File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -387,6 +387,10 @@ bool swift::checkDistributedSerializationRequirementIsExactlyCodable(
387
387
bool AbstractFunctionDecl::isDistributedActorSystemRemoteCall (bool isVoidReturn) const {
388
388
auto &C = getASTContext ();
389
389
auto module = getParentModule ();
390
+ auto *DC = getDeclContext ();
391
+
392
+ if (!DC->isTypeContext () || !isGeneric ())
393
+ return false ;
390
394
391
395
// === Check the name
392
396
auto callId = isVoidReturn ? C.Id_remoteCallVoid : C.Id_remoteCall ;
@@ -398,7 +402,7 @@ bool AbstractFunctionDecl::isDistributedActorSystemRemoteCall(bool isVoidReturn)
398
402
ProtocolDecl *systemProto =
399
403
C.getDistributedActorSystemDecl ();
400
404
401
- auto systemNominal = getDeclContext () ->getSelfNominalTypeDecl ();
405
+ auto systemNominal = DC ->getSelfNominalTypeDecl ();
402
406
auto distSystemConformance = module ->lookupConformance (
403
407
systemNominal->getDeclaredInterfaceType (), systemProto);
404
408
You can’t perform that action at this time.
0 commit comments