@@ -465,8 +465,7 @@ static ValueDecl *deriveDistributedActor_id(DerivedConformance &derived) {
465
465
/* isStatic=*/ false , /* isFinal=*/ true );
466
466
467
467
// 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));
470
469
471
470
derived.addMemberToConformanceContext (pbDecl, /* insertAtHead=*/ true );
472
471
derived.addMemberToConformanceContext (propDecl, /* insertAtHead=*/ true );
@@ -496,8 +495,7 @@ static ValueDecl *deriveDistributedActor_actorSystem(
496
495
propertyType, /* isStatic=*/ false , /* isFinal=*/ true );
497
496
498
497
// 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));
501
499
502
500
// IMPORTANT: `id` MUST be the first field of a distributed actor, and
503
501
// `actorSystem` MUST be the second field, because for a remote instance
@@ -795,8 +793,7 @@ static ValueDecl *deriveDistributedActor_unownedExecutor(DerivedConformance &der
795
793
property->getAttrs ().add (new (ctx) SemanticsAttr (SEMANTICS_DEFAULT_ACTOR,
796
794
SourceLoc (), SourceRange (),
797
795
/* implicit*/ true ));
798
- property->getAttrs ().add (
799
- new (ctx) NonisolatedAttr (/* unsafe=*/ false , /* implicit=*/ true ));
796
+ property->getAttrs ().add (NonisolatedAttr::createImplicit (ctx));
800
797
801
798
// Make the property implicitly final.
802
799
property->getAttrs ().add (new (ctx) FinalAttr (/* IsImplicit=*/ true ));
0 commit comments