File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %empty-directory(%t)
2+ // RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -disable-availability-checking %S/Inputs/FakeDistributedActorSystems.swift
3+ // RUN: %target-swift-frontend -typecheck -verify -disable-availability-checking -I %t 2>&1 %s
4+
5+ // REQUIRES: concurrency
6+ // REQUIRES: distributed
7+
8+ import Distributed
9+ import FakeDistributedActorSystems
10+
11+ protocol Device : DistributedActor {
12+ distributed func fetch( ) async -> String ?
13+
14+ distributed func fetch2( ) async -> String ?
15+ distributed func fetch5( ) async -> String ?
16+ }
17+
18+ distributed actor Impl : Device {
19+ typealias ActorSystem = FakeActorSystem
20+
21+ init ( actorSystem: ActorSystem ) {
22+ self . actorSystem = actorSystem
23+ }
24+
25+ // fetch() uses default impl
26+
27+ distributed func fetch2( ) async -> String ? {
28+ " "
29+ }
30+
31+ distributed func fetch5( ) async -> String ? {
32+ " "
33+ }
34+ }
35+
36+ // MARK: - Device default implementation
37+
38+ extension Device {
39+ distributed func fetch( ) async -> String ? { " " }
40+
41+ distributed func fetch2( ) async -> String ? { " " }
42+ distributed func fetch5( ) async -> String ? { " " }
43+ }
You can’t perform that action at this time.
0 commit comments