mirror of
https://github.com/apple/swift.git
synced 2026-10-22 19:15:50 +02:00
We don't need to feature gate the distributed support in Embedded after all. Drop the flag before folks have the chance to adopt it so we don't have to bother anyone about passing the flag to begin with. If anyone did already pass it, `-enable-experimental-feature EmbeddedDistributed` now emits the usual "not a recognized experimental feature" warning and is otherwise ignored, which is fine.
22 lines
916 B
Swift
22 lines
916 B
Swift
// RUN: %target-swift-frontend -typecheck -enable-experimental-feature Embedded -parse-as-library -wmo -target %target-cpu-apple-macos14 %s %S/Runtime/Inputs/PortableRoundtripActorSystem.swift
|
|
// RUN: %target-swift-frontend -typecheck -target %target-cpu-apple-macos14 %s %S/Runtime/Inputs/PortableRoundtripActorSystem.swift
|
|
|
|
// REQUIRES: OS=macosx
|
|
// REQUIRES: swift_feature_Embedded
|
|
// REQUIRES: optimized_stdlib
|
|
|
|
// The SAME distributed-actor source below type-checks in both Embedded and
|
|
// ordinary Swift. The mode-specific machinery (the actor system, its
|
|
// serialization layer, and the `remoteCall` family shape) all lives in the
|
|
// shared Inputs/PortableRoundtripActorSystem.swift, behind `#if $Embedded`, so
|
|
// user code never mentions a mode at all.
|
|
|
|
import _Concurrency
|
|
import Distributed
|
|
|
|
distributed actor Greeter {
|
|
distributed func hello(name: String) -> String {
|
|
return "Hello, \(name)!"
|
|
}
|
|
}
|