Skip to content

Commit e4332b7

Browse files
committed
improve FIXME to link to issue
1 parent 0df9742 commit e4332b7

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
@@ -9154,7 +9154,7 @@ ActorIsolation swift::getActorIsolationOfContext(DeclContext *dc) {
91549154
auto selfDecl = isolation.getActorInstance();
91559155
auto actorClass = selfDecl->getType()->getReferenceStorageReferent()
91569156
->getClassOrBoundGenericClass();
9157-
// FIXME: Doesn't work properly with generics
9157+
// FIXME: Doesn't work properly with generics #59356
91589158
assert(actorClass && "Bad closure actor isolation?");
91599159
return ActorIsolation::forActorInstance(actorClass)
91609160
.withPreconcurrency(isolation.preconcurrency());

test/Distributed/distributed_protocol_isolation.swift

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

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

0 commit comments

Comments
 (0)