File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -9224,7 +9224,7 @@ ActorIsolation swift::getActorIsolationOfContext(DeclContext *dc) {
9224
9224
auto selfDecl = isolation.getActorInstance ();
9225
9225
auto actorClass = selfDecl->getType ()->getReferenceStorageReferent ()
9226
9226
->getClassOrBoundGenericClass ();
9227
- // FIXME: Doesn't work properly with generics
9227
+ // FIXME: Doesn't work properly with generics #59356
9228
9228
assert (actorClass && " Bad closure actor isolation?" );
9229
9229
return ActorIsolation::forActorInstance (actorClass)
9230
9230
.withPreconcurrency (isolation.preconcurrency ());
Original file line number Diff line number Diff line change @@ -212,6 +212,22 @@ func test_watchingDA<WDA: TerminationWatchingDA>(da: WDA) async throws {
212
212
try await da. terminated ( da: " the terminated func is not distributed " )
213
213
// expected-error@-1{{only 'distributed' instance methods can be called on a potentially remote distributed actor}}
214
214
// 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
+ }
215
231
}
216
232
217
233
func test_watchingDA_any( da: any TerminationWatchingDA ) async throws {
You can’t perform that action at this time.
0 commit comments