@@ -465,8 +465,7 @@ static ValueDecl *deriveDistributedActor_id(DerivedConformance &derived) {
465465 /* isStatic=*/ false , /* isFinal=*/ true );
466466
467467 // mark as nonisolated, allowing access to it from everywhere
468- propDecl->getAttrs ().add (
469- new (C) NonisolatedAttr (/* unsafe=*/ false , /* implicit=*/ true ));
468+ propDecl->getAttrs ().add (NonisolatedAttr::createImplicit (C));
470469
471470 derived.addMemberToConformanceContext (pbDecl, /* insertAtHead=*/ true );
472471 derived.addMemberToConformanceContext (propDecl, /* insertAtHead=*/ true );
@@ -496,8 +495,7 @@ static ValueDecl *deriveDistributedActor_actorSystem(
496495 propertyType, /* isStatic=*/ false , /* isFinal=*/ true );
497496
498497 // mark as nonisolated, allowing access to it from everywhere
499- propDecl->getAttrs ().add (
500- new (C) NonisolatedAttr (/* unsafe=*/ false , /* implicit=*/ true ));
498+ propDecl->getAttrs ().add (NonisolatedAttr::createImplicit (C));
501499
502500 // IMPORTANT: `id` MUST be the first field of a distributed actor, and
503501 // `actorSystem` MUST be the second field, because for a remote instance
@@ -795,8 +793,7 @@ static ValueDecl *deriveDistributedActor_unownedExecutor(DerivedConformance &der
795793 property->getAttrs ().add (new (ctx) SemanticsAttr (SEMANTICS_DEFAULT_ACTOR,
796794 SourceLoc (), SourceRange (),
797795 /* implicit*/ true ));
798- property->getAttrs ().add (
799- new (ctx) NonisolatedAttr (/* unsafe=*/ false , /* implicit=*/ true ));
796+ property->getAttrs ().add (NonisolatedAttr::createImplicit (ctx));
800797
801798 // Make the property implicitly final.
802799 property->getAttrs ().add (new (ctx) FinalAttr (/* IsImplicit=*/ true ));
0 commit comments