We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
HasIsolatedSelfRequest
1 parent 13dbd37 commit 9d5f546Copy full SHA for 9d5f546
lib/Sema/TypeCheckConcurrency.cpp
@@ -3910,8 +3910,13 @@ bool HasIsolatedSelfRequest::evaluate(
3910
return false;
3911
3912
// For accessors, consider the storage declaration.
3913
- if (auto accessor = dyn_cast<AccessorDecl>(value))
3914
- value = accessor->getStorage();
+ if (auto accessor = dyn_cast<AccessorDecl>(value)) {
+ // distributed thunks are accessors only in spirit and
3915
+ // should be handled as regular functions from isolation
3916
+ // perspective.
3917
+ if (!accessor->isDistributedThunk())
3918
+ value = accessor->getStorage();
3919
+ }
3920
3921
// Check whether this member can be isolated to an actor at all.
3922
auto memberIsolation = getMemberIsolationPropagation(value);
0 commit comments