mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Use the `%target-swift-5.X-abi-triple` substitutions to compile the tests for deployment to the minimum OS versions required for the APIs used in the tests, instead of disabling availability checking.
24 lines
822 B
Swift
24 lines
822 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -target %target-swift-5.7-abi-triple %S/Inputs/FakeDistributedActorSystems.swift
|
|
// RUN: %target-swift-frontend -typecheck -verify -target %target-swift-5.7-abi-triple -I %t 2>&1 %s
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: distributed
|
|
|
|
import Distributed
|
|
import FakeDistributedActorSystems
|
|
|
|
typealias DefaultDistributedActorSystem = FakeActorSystem
|
|
|
|
typealias Message = Sendable & Codable
|
|
|
|
distributed actor GreeterX<A: Message> {
|
|
distributed func generic<V: Message>(_ value: V) -> String {
|
|
return "\(value)"
|
|
}
|
|
|
|
distributed func generic2<B: Message>(
|
|
strict: Double, _ value: A, _ bs: [B]) -> String {
|
|
return "\(value) \(bs)"
|
|
}
|
|
}
|