Skip to content

Commit 7de8432

Browse files
committed
[Distributed] Bring back module interface test for DA
1 parent 520e124 commit 7de8432

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-emit-module-interface(%t/TestResilient.swiftinterface) %s -module-name TestResilient
3+
// RUN: %target-swift-typecheck-module-from-interface(%t/TestResilient.swiftinterface) -module-name TestResilient
4+
// RUN: %FileCheck %s < %t/TestResilient.swiftinterface
5+
// RUN: %target-swift-frontend -compile-module-from-interface -swift-version 5 %t/TestResilient.swiftinterface -o %t/TestResilient.swiftmodule
6+
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules -swift-version 5 -emit-module-interface-path - %t/TestResilient.swiftmodule -module-name TestResilient | %FileCheck %s
7+
import Distributed
8+
9+
@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) // SwiftStdlib 5.7
10+
typealias DefaultDistributedActorSystem = LocalTestingDistributedActorSystem
11+
12+
@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) // SwiftStdlib 5.7
13+
distributed actor CheckMe {
14+
distributed func test() {
15+
// ...
16+
}
17+
18+
}
19+
20+
@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) // SwiftStdlib 5.7
21+
public struct HasDistributedActors {
22+
let check: CheckMe
23+
24+
func test() async throws {
25+
try await check.test()
26+
}
27+
}

0 commit comments

Comments
 (0)