File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-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,27 @@ public distributed actor MyActor {
12
12
public typealias ActorSystem = LocalTestingDistributedActorSystem
13
13
// nothing
14
14
}
15
+
16
+ public protocol Kappa { }
17
+
18
+ /// This combination of DistributedActor + Codable used to trigger a crash in DistributedAccessor::emit (rdar://111664985)
19
+ /// So returning it from distributed methods in the types below covers this radar.
20
+ public protocol ClusterSingleton : DistributedActor , Codable { }
21
+
22
+ @available ( SwiftStdlib 5 . 6 , * )
23
+ public distributed actor MyActorGenerics {
24
+ public typealias ActorSystem = LocalTestingDistributedActorSystem
25
+
26
+ distributed func find< Act: ClusterSingleton > ( byName name: String ) -> Act {
27
+ fatalError ( " mock impl " )
28
+ }
29
+ }
30
+
31
+ @available ( SwiftStdlib 5 . 6 , * )
32
+ public distributed actor MyActorGenericsOnType < Act: ClusterSingleton > {
33
+ public typealias ActorSystem = LocalTestingDistributedActorSystem
34
+
35
+ distributed func find( byName name: String ) -> Act {
36
+ fatalError ( " mock impl " )
37
+ }
38
+ }
You can’t perform that action at this time.
0 commit comments