mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Distributed] Don't crash in thunk generation when missing SR conformance
This commit is contained in:
@@ -842,9 +842,15 @@ FuncDecl *GetDistributedThunkRequest::evaluate(Evaluator &evaluator,
|
||||
if (!distributedTarget->isDistributed())
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
assert(distributedTarget);
|
||||
|
||||
// This evaluation type-check by now was already computed and cached;
|
||||
// We need to check in order to avoid emitting a THUNK for a distributed func
|
||||
// which had errors; as the thunk then may also cause un-addressable issues and confusion.
|
||||
if (swift::checkDistributedFunction(distributedTarget)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto &C = distributedTarget->getASTContext();
|
||||
|
||||
if (!getConcreteReplacementForProtocolActorSystemType(distributedTarget)) {
|
||||
|
||||
Reference in New Issue
Block a user