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 27fde3e commit b635756Copy full SHA for b635756
lib/Sema/TypeCheckConcurrency.cpp
@@ -3859,8 +3859,13 @@ bool HasIsolatedSelfRequest::evaluate(
3859
return false;
3860
3861
// For accessors, consider the storage declaration.
3862
- if (auto accessor = dyn_cast<AccessorDecl>(value))
3863
- value = accessor->getStorage();
+ if (auto accessor = dyn_cast<AccessorDecl>(value)) {
+ // distributed thunks are accessors only in spirit and
3864
+ // should be handled as regular functions from isolation
3865
+ // perspective.
3866
+ if (!accessor->isDistributedThunk())
3867
+ value = accessor->getStorage();
3868
+ }
3869
3870
// Check whether this member can be isolated to an actor at all.
3871
auto memberIsolation = getMemberIsolationPropagation(value);
0 commit comments