@@ -2561,23 +2561,17 @@ static Optional<ActorIsolation> getIsolationFromAttributes(
25612561 // If any of them are present, use that attribute.
25622562 auto nonisolatedAttr = decl->getAttrs ().getAttribute <NonisolatedAttr>();
25632563 auto globalActorAttr = decl->getGlobalActorAttr ();
2564- auto distributedActorIndependentAttr =
2565- decl->getAttrs ().getAttribute <DistributedActorIndependentAttr>();
25662564
25672565 // Remove implicit attributes if we only care about explicit ones.
25682566 if (onlyExplicit) {
25692567 if (nonisolatedAttr && nonisolatedAttr->isImplicit ())
25702568 nonisolatedAttr = nullptr ;
25712569 if (globalActorAttr && globalActorAttr->first ->isImplicit ())
25722570 globalActorAttr = None;
2573- if (distributedActorIndependentAttr &&
2574- distributedActorIndependentAttr->isImplicit ())
2575- distributedActorIndependentAttr = nullptr ;
25762571 }
25772572
25782573 unsigned numIsolationAttrs =
2579- (nonisolatedAttr ? 1 : 0 ) + (globalActorAttr ? 1 : 0 ) +
2580- (distributedActorIndependentAttr ? 1 : 0 );
2574+ (nonisolatedAttr ? 1 : 0 ) + (globalActorAttr ? 1 : 0 );
25812575 if (numIsolationAttrs == 0 )
25822576 return None;
25832577
@@ -2594,32 +2588,20 @@ static Optional<ActorIsolation> getIsolationFromAttributes(
25942588
25952589 if (globalActorAttr) {
25962590 if (shouldDiagnose) {
2597- if (globalActorAttr) {
2598- const DeclAttribute *otherAttr =
2599- nonisolatedAttr
2600- ? static_cast <const DeclAttribute *>(nonisolatedAttr)
2601- : distributedActorIndependentAttr;
2602- decl->diagnose (
2603- diag::actor_isolation_multiple_attr, decl->getDescriptiveKind (),
2604- name, otherAttr->getAttrName (),
2605- globalActorAttr->second ->getName ().str ())
2606- .highlight (otherAttr->getRangeWithAt ())
2607- .highlight (globalActorAttr->first ->getRangeWithAt ());
2608- } else {
2609- decl->diagnose (
2610- diag::actor_isolation_multiple_attr, decl->getDescriptiveKind (),
2611- name, nonisolatedAttr->getAttrName (),
2612- distributedActorIndependentAttr->getAttrName ())
2613- .highlight (nonisolatedAttr->getRangeWithAt ())
2614- .highlight (distributedActorIndependentAttr->getRangeWithAt ());
2591+ decl->diagnose (
2592+ diag::actor_isolation_multiple_attr, decl->getDescriptiveKind (),
2593+ name, nonisolatedAttr->getAttrName (),
2594+ globalActorAttr->second ->getName ().str ())
2595+ .highlight (nonisolatedAttr->getRangeWithAt ())
2596+ .highlight (globalActorAttr->first ->getRangeWithAt ());
26152597 }
26162598 }
26172599 }
26182600 }
26192601
2620- // If the declaration is explicitly marked 'nonisolated' or distributed
2621- // actor- independent, report it as nonisolated .
2622- if (nonisolatedAttr || distributedActorIndependentAttr ) {
2602+ // If the declaration is explicitly marked 'nonisolated', report it as
2603+ // independent.
2604+ if (nonisolatedAttr) {
26232605 return ActorIsolation::forIndependent ();
26242606 }
26252607
0 commit comments