Skip to content

Commit bd052ee

Browse files
committed
improve FIXME to link to issue
1 parent 7792a31 commit bd052ee

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9224,7 +9224,7 @@ ActorIsolation swift::getActorIsolationOfContext(DeclContext *dc) {
92249224
auto selfDecl = isolation.getActorInstance();
92259225
auto actorClass = selfDecl->getType()->getReferenceStorageReferent()
92269226
->getClassOrBoundGenericClass();
9227-
// FIXME: Doesn't work properly with generics
9227+
// FIXME: Doesn't work properly with generics #59356
92289228
assert(actorClass && "Bad closure actor isolation?");
92299229
return ActorIsolation::forActorInstance(actorClass)
92309230
.withPreconcurrency(isolation.preconcurrency());

test/Distributed/distributed_protocol_isolation.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,22 @@ func test_watchingDA<WDA: TerminationWatchingDA>(da: WDA) async throws {
212212
try await da.terminated(da: "the terminated func is not distributed")
213213
// expected-error@-1{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
214214
// expected-warning@-2{{no calls to throwing functions occur within 'try' expression}}
215+
216+
// // FIXME: pending fix of closure isolation checking with actors #59356
217+
// await da.whenLocal { __secretlyKnownToBeLocal in
218+
// await __secretlyKnownToBeLocal.terminated(da: "local calls are okey!") // OK
219+
// }
220+
}
221+
222+
func test_watchingDA_erased(da: DA_TerminationWatchingDA) async throws {
223+
let wda: TerminationWatchingDA = da
224+
try await wda.terminated(wda: "the terminated func is not distributed")
225+
// expected-error@-1{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
226+
// expected-warning@-2{{no calls to throwing functions occur within 'try' expression}}
227+
228+
await wda.whenLocal { __secretlyKnownToBeLocal in
229+
await __secretlyKnownToBeLocal.terminated(da: "local calls are okey!") // OK
230+
}
215231
}
216232

217233
func test_watchingDA_any(da: any TerminationWatchingDA) async throws {

0 commit comments

Comments
 (0)