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