Skip to content

Commit f13ef4e

Browse files
authored
Merge pull request #40237 from ktoso/wip-distributed-private
2 parents c9e35d7 + 451b8a6 commit f13ef4e

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4519,9 +4519,6 @@ ERROR(nonisolated_distributed_actor_storage,none,
45194519
ERROR(distributed_actor_func_nonisolated, none,
45204520
"cannot declare method %0 as both 'nonisolated' and 'distributed'",
45214521
(DeclName))
4522-
ERROR(distributed_actor_func_private, none,
4523-
"%0 %1 cannot be 'private'",
4524-
(DescriptiveDeclKind, DeclName))
45254522
ERROR(distributed_actor_func_inout, none,
45264523
"cannot declare 'inout' argument %0 in %1 %2",
45274524
(DeclName, DescriptiveDeclKind, DeclName))

lib/Sema/TypeCheckDistributed.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,6 @@ bool swift::checkDistributedFunction(FuncDecl *func, bool diagnose) {
125125

126126
auto module = func->getParentModule();
127127

128-
if (func->getEffectiveAccess() == AccessLevel::FilePrivate) {
129-
func->diagnose(diag::distributed_actor_func_private,
130-
func->getDescriptiveKind(), func->getName());
131-
// TODO(distributed): fixit remove the 'private' from the declaration
132-
return true;
133-
}
134-
135128
// --- Check parameters for 'Codable' conformance
136129
for (auto param : *func->getParameters()) {
137130
auto paramTy = func->mapTypeIntoContext(param->getInterfaceType());

test/Distributed/distributed_actor_isolation.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ distributed actor DistributedActor_1 {
5252
// expected-error@-1{{class methods are only allowed within classes; use 'static' to declare a static method}}
5353
// expected-error@-2{{'distributed' method cannot be 'static'}} // TODO(distributed): should call out 'class' instead?
5454

55-
distributed private func distributedPrivate() {} //expected-error{{distributed instance method 'distributedPrivate()' cannot be 'private'}}
56-
5755
func hello() {} // expected-note{{distributed actor-isolated instance method 'hello()' declared here}}
5856
func helloAsync() async {} // expected-note{{distributed actor-isolated instance method 'helloAsync()' declared here}}
5957
func helloAsyncThrows() async throws {} // expected-note{{distributed actor-isolated instance method 'helloAsyncThrows()' declared here}}

0 commit comments

Comments
 (0)