Skip to content

Commit b635756

Browse files
xedinktoso
authored andcommitted
[Distributed] Teach HasIsolatedSelfRequest about distributed thunk accessors
1 parent 27fde3e commit b635756

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3859,8 +3859,13 @@ bool HasIsolatedSelfRequest::evaluate(
38593859
return false;
38603860

38613861
// For accessors, consider the storage declaration.
3862-
if (auto accessor = dyn_cast<AccessorDecl>(value))
3863-
value = accessor->getStorage();
3862+
if (auto accessor = dyn_cast<AccessorDecl>(value)) {
3863+
// 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+
}
38643869

38653870
// Check whether this member can be isolated to an actor at all.
38663871
auto memberIsolation = getMemberIsolationPropagation(value);

0 commit comments

Comments
 (0)