Skip to content

[Distributed] Bring back module interface test for DA #70199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions test/ModuleInterface/distributed_actors_module.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-emit-module-interface(%t/TestResilient.swiftinterface) %s -module-name TestResilient
// RUN: %target-swift-typecheck-module-from-interface(%t/TestResilient.swiftinterface) -module-name TestResilient
// RUN: %FileCheck %s < %t/TestResilient.swiftinterface
// RUN: %target-swift-frontend -compile-module-from-interface -swift-version 5 %t/TestResilient.swiftinterface -o %t/TestResilient.swiftmodule
// 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
import Distributed

@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) // SwiftStdlib 5.7
public typealias DefaultDistributedActorSystem = LocalTestingDistributedActorSystem

// CHECK: {{.*}}distributed {{.*}} actor CheckMe
@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) // SwiftStdlib 5.7
public distributed actor CheckMe {
distributed func test() {
// ...
}

}

// CHECK: public struct HasDistributedActors
@available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *) // SwiftStdlib 5.7
public struct HasDistributedActors {
let check: CheckMe

func test() async throws {
try await check.test()
}
}