mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Various distributed actors test cases were testing behavior that ultimately depends on availability checking but then disabled availability checking on the command line when building. This will break with future planned changes to availability checking infrastructure.
29 lines
1.4 KiB
Swift
29 lines
1.4 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems %S/../Inputs/FakeDistributedActorSystems.swift
|
|
// RUN: %target-swift-frontend -module-name default_deinit -primary-file %s -emit-sil -verify -I %t | %FileCheck %s --enable-var-scope
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: distributed
|
|
|
|
/// The convention in this test is that the Swift declaration comes before its FileCheck lines.
|
|
|
|
import Distributed
|
|
import FakeDistributedActorSystems
|
|
|
|
@available(SwiftStdlib 5.7, *)
|
|
typealias DefaultDistributedActorSystem = FakeRoundtripActorSystem
|
|
|
|
// ==== ----------------------------------------------------------------------------------------------------------------
|
|
|
|
@available(SwiftStdlib 5.9, *)
|
|
distributed actor MyDistActor {
|
|
nonisolated var unownedExecutor: UnownedSerialExecutor {
|
|
return MainActor.sharedUnownedExecutor
|
|
}
|
|
|
|
// // MyDistActor.init(actorSystem:)
|
|
// CHECK: sil hidden{{.*}} @$s14default_deinit11MyDistActorC11actorSystemAC015FakeDistributedE7Systems0h9RoundtripeG0C_tcfc : $@convention(method) (@owned FakeRoundtripActorSystem, @owned MyDistActor) -> @owned MyDistActor
|
|
// CHECK-NOT: {{%[0-9]+}} = builtin "initializeDefaultActor"(%1 : $MyDistActor) : $()
|
|
// CHECK: [[ACTOR_INSTANCE:%[0-9]+]] = builtin "initializeNonDefaultDistributedActor"(%1 : $MyDistActor) : $()
|
|
}
|
|
|