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) {
5400
5400
void AttributeChecker::visitDistributedActorAttr (DistributedActorAttr *attr) {
5401
5401
auto dc = D->getDeclContext ();
5402
5402
5403
- // distributed can be applied to actor class definitions and async functions
5403
+ // distributed can be applied to actor definitions and their methods
5404
5404
if (auto varDecl = dyn_cast<VarDecl>(D)) {
5405
5405
// distributed can not be applied to stored properties
5406
5406
diagnoseAndRemoveAttr (attr, diag::distributed_actor_property);
Original file line number Diff line number Diff line change @@ -385,18 +385,6 @@ ActorIsolationRestriction ActorIsolationRestriction::forDeclaration(
385
385
if (auto func = dyn_cast<AbstractFunctionDecl>(decl)) {
386
386
if (func->isAsyncContext ())
387
387
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
- }
400
388
}
401
389
402
390
// Similarly, a computed property or subscript that has an 'async' getter
You can’t perform that action at this time.
0 commit comments