Skip to content

Commit be1a69b

Browse files
authored
[Distributed] Simplify AsLocalActor detecting a bit in isolation checker (#75361)
1 parent 9a886c6 commit be1a69b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6913,12 +6913,8 @@ VarDecl *swift::getReferencedParamOrCapture(
69136913
// used for isolation purposes.
69146914
if (auto memberRef = dyn_cast<MemberRefExpr>(expr)) {
69156915
if (auto refDecl = expr->getReferencedDecl(/*stopAtParenExpr=*/true)) {
6916-
if (auto decl = refDecl.getDecl()) {
6917-
auto module = decl->getDeclContext()->getParentModule();
6918-
auto AsLocalActorDecl =
6919-
getDistributedActorAsLocalActorComputedProperty(module);
6920-
6921-
if (decl == AsLocalActorDecl) {
6916+
if (auto decl = dyn_cast_or_null<VarDecl>(refDecl.getDecl())) {
6917+
if (isDistributedActorAsLocalActorComputedProperty(decl)) {
69226918
return getCurrentIsolatedVar();
69236919
}
69246920
}

0 commit comments

Comments
 (0)