Skip to content

Commit cecdc80

Browse files
committed
impose self restrictions in distributed actor inits
I initially left-out these restrictions, while the design of distributed actor inits was in flux. Now that the dust is somewhat settled, we need the same restrictions on `self` that regular actors have, because we do not want the local instance to have races in the init.
1 parent e2c3089 commit cecdc80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Mandatory/DIMemoryUseCollector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ ConstructorDecl *DIMemoryObjectInfo::getActorInitSelf() const {
438438
if (auto decl =
439439
dyn_cast_or_null<ClassDecl>(getASTType()->getAnyNominal()))
440440
// is it for an actor?
441-
if (decl->isActor() && !decl->isDistributedActor()) // FIXME(78484431) skip distributed actors for now, until their initializers are fixed!
441+
if (decl->isAnyActor())
442442
if (auto *silFn = MemoryInst->getFunction())
443443
// is it a designated initializer?
444444
if (auto *ctor = dyn_cast_or_null<ConstructorDecl>(

0 commit comments

Comments
 (0)