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.
1 parent 9a886c6 commit be1a69bCopy full SHA for be1a69b
lib/Sema/TypeCheckConcurrency.cpp
@@ -6913,12 +6913,8 @@ VarDecl *swift::getReferencedParamOrCapture(
6913
// used for isolation purposes.
6914
if (auto memberRef = dyn_cast<MemberRefExpr>(expr)) {
6915
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) {
+ if (auto decl = dyn_cast_or_null<VarDecl>(refDecl.getDecl())) {
+ if (isDistributedActorAsLocalActorComputedProperty(decl)) {
6922
return getCurrentIsolatedVar();
6923
}
6924
0 commit comments