Skip to content

Commit d366979

Browse files
committed
Add test case
1 parent 214b1bd commit d366979

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/SILGen/distributed_thunk.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// RUN: %target-swift-emit-silgen %s -enable-experimental-distributed -disable-availability-checking | %FileCheck %s --dump-input=fail
2+
// REQUIRES: concurrency
3+
// REQUIRES: distributed
4+
5+
import _Distributed
6+
7+
distributed actor DA { }
8+
9+
extension DA {
10+
// CHECK-LABEL: sil hidden [thunk] [ossa] @$s17distributed_thunk2DAC1fyyFTd : $@convention(method) @async (@guaranteed DA) -> @error Error
11+
// CHECK: function_ref @swift_distributed_actor_is_remote
12+
13+
// Call the actor function
14+
// CHECK: function_ref @$s17distributed_thunk2DAC1fyyF : $@convention(method) (@guaranteed DA) -> ()
15+
16+
// ... or the remote thunk
17+
// CHECK: dynamic_function_ref @$s17distributed_thunk2DAC9_remote_fyyYaKF : $@convention(method) @async (@guaranteed DA) -> @error Error
18+
distributed func f() { }
19+
}

0 commit comments

Comments
 (0)