File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -5400,7 +5400,7 @@ void AttributeChecker::visitActorAttr(ActorAttr *attr) {
54005400void AttributeChecker::visitDistributedActorAttr (DistributedActorAttr *attr) {
54015401 auto dc = D->getDeclContext ();
54025402
5403- // distributed can be applied to actor class definitions and async functions
5403+ // distributed can be applied to actor definitions and their methods
54045404 if (auto varDecl = dyn_cast<VarDecl>(D)) {
54055405 // distributed can not be applied to stored properties
54065406 diagnoseAndRemoveAttr (attr, diag::distributed_actor_property);
Original file line number Diff line number Diff line change @@ -385,18 +385,6 @@ ActorIsolationRestriction ActorIsolationRestriction::forDeclaration(
385385 if (auto func = dyn_cast<AbstractFunctionDecl>(decl)) {
386386 if (func->isAsyncContext ())
387387 isAccessibleAcrossActors = true ;
388-
389- // FIXME: move diagnosis out of this function entirely (!)
390- if (func->isDistributed ()) {
391- if (auto classDecl = dyn_cast<ClassDecl>(decl->getDeclContext ())) {
392- if (!classDecl->isDistributedActor ()) {
393- // `distributed func` must only be defined in `distributed actor`
394- func->diagnose (
395- diag::distributed_actor_func_defined_outside_of_distributed_actor,
396- func->getName ());
397- }
398- } // TODO: need to handle protocol case here too?
399- }
400388 }
401389
402390 // Similarly, a computed property or subscript that has an 'async' getter
You can’t perform that action at this time.
0 commit comments