Skip to content

Commit a3aa341

Browse files
committed
Fix for 5.5 branch
1 parent e417288 commit a3aa341

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,8 @@ ActorIsolationRestriction ActorIsolationRestriction::forDeclaration(
521521
if (cast<ValueDecl>(decl)->isLocalCapture())
522522
return forUnrestricted();
523523

524+
auto isolation = getActorIsolation(cast<ValueDecl>(decl));
525+
524526
// 'let' declarations are immutable, so they can be accessed across
525527
// actors.
526528
bool isAccessibleAcrossActors = false;
@@ -555,7 +557,7 @@ ActorIsolationRestriction ActorIsolationRestriction::forDeclaration(
555557
}
556558

557559
// Determine the actor isolation of the given declaration.
558-
switch (auto isolation = getActorIsolation(cast<ValueDecl>(decl))) {
560+
switch (isolation) {
559561
case ActorIsolation::ActorInstance:
560562
// Protected actor instance members can only be accessed on 'self'.
561563
return forActorSelf(isolation.getActor(),

0 commit comments

Comments
 (0)