[Distributed] distributed func checks now work in protocols & dont crash

This commit is contained in:
Konrad `ktoso` Malawski
2022-06-24 17:45:55 +09:00
parent 22b20afce6
commit fa077c1390
7 changed files with 47 additions and 5 deletions

View File

@@ -793,7 +793,6 @@ FuncDecl *GetDistributedThunkRequest::evaluate(
return nullptr;
auto &C = distributedTarget->getASTContext();
auto DC = distributedTarget->getDeclContext();
if (!getConcreteReplacementForProtocolActorSystemType(distributedTarget)) {
// Don't synthesize thunks, unless there is a *concrete* ActorSystem.
@@ -817,9 +816,6 @@ FuncDecl *GetDistributedThunkRequest::evaluate(
if (!C.getLoadedModule(C.Id_Distributed))
return nullptr;
auto nominal = DC->getSelfNominalTypeDecl(); // NOTE: Always from DC
assert(nominal);
// --- Prepare the "distributed thunk" which does the "maybe remote" dance:
return createDistributedThunkFunction(func);
}