File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -616,6 +616,8 @@ void DistributedAccessor::emit() {
616616
617617 auto params = IGF.collectParameters ();
618618
619+ GenericContextScope scope (IGM, targetTy->getInvocationGenericSignature ());
620+
619621 auto directResultTy = targetConv.getSILResultType (expansionContext);
620622 const auto &directResultTI = IGM.getTypeInfo (directResultTy);
621623
@@ -652,8 +654,6 @@ void DistributedAccessor::emit() {
652654 // Witness table for decoder conformance to DistributedTargetInvocationDecoder
653655 auto *decoderProtocolWitness = params.claimNext ();
654656
655- GenericContextScope scope (IGM, targetTy->getInvocationGenericSignature ());
656-
657657 // Preliminary: Setup async context for this accessor.
658658 {
659659 auto fpKind = FunctionPointerKind::defaultAsync ();
Original file line number Diff line number Diff line change @@ -12,3 +12,25 @@ public distributed actor MyActor {
1212 public typealias ActorSystem = LocalTestingDistributedActorSystem
1313 // nothing
1414}
15+
16+ /// This combination of DistributedActor + Codable used to trigger a crash in DistributedAccessor::emit (rdar://111664985)
17+ /// So returning it from distributed methods in the types below covers this radar.
18+ public protocol ClusterSingleton : DistributedActor , Codable { }
19+
20+ @available ( SwiftStdlib 5 . 6 , * )
21+ public distributed actor MyActorGenerics {
22+ public typealias ActorSystem = LocalTestingDistributedActorSystem
23+
24+ distributed func find< Act: ClusterSingleton > ( byName name: String ) -> Act {
25+ fatalError ( " mock impl " )
26+ }
27+ }
28+
29+ @available ( SwiftStdlib 5 . 6 , * )
30+ public distributed actor MyActorGenericsOnType < Act: ClusterSingleton > {
31+ public typealias ActorSystem = LocalTestingDistributedActorSystem
32+
33+ distributed func find( byName name: String ) -> Act {
34+ fatalError ( " mock impl " )
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments