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() {
616
616
617
617
auto params = IGF.collectParameters ();
618
618
619
+ GenericContextScope scope (IGM, targetTy->getInvocationGenericSignature ());
620
+
619
621
auto directResultTy = targetConv.getSILResultType (expansionContext);
620
622
const auto &directResultTI = IGM.getTypeInfo (directResultTy);
621
623
@@ -652,8 +654,6 @@ void DistributedAccessor::emit() {
652
654
// Witness table for decoder conformance to DistributedTargetInvocationDecoder
653
655
auto *decoderProtocolWitness = params.claimNext ();
654
656
655
- GenericContextScope scope (IGM, targetTy->getInvocationGenericSignature ());
656
-
657
657
// Preliminary: Setup async context for this accessor.
658
658
{
659
659
auto fpKind = FunctionPointerKind::defaultAsync ();
Original file line number Diff line number Diff line change @@ -12,3 +12,25 @@ public distributed actor MyActor {
12
12
public typealias ActorSystem = LocalTestingDistributedActorSystem
13
13
// nothing
14
14
}
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