Skip to content

Commit f7cd8e9

Browse files
committed
Remove a dead diagnostic
1 parent d04fff6 commit f7cd8e9

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5400,7 +5400,7 @@ void AttributeChecker::visitActorAttr(ActorAttr *attr) {
54005400
void 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);

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)