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) {
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 ());
Original file line number Diff line number Diff 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
217233func test_watchingDA_any( da: any TerminationWatchingDA ) async throws {
You can’t perform that action at this time.
0 commit comments