mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The resignID call within the initializer moved into DI, because an assignment to the actorSystem, and thus initialization of the id, is no longer guaranteed to happen. Thus, while we previously could model the resignation as a clean-up emitted on all unwind paths in an initializer, now it's conditional, based on whether the id was initialized. This is exactly what DI is designed to do, so we inject the resignation call just before we call the identity's deinit.
16 lines
826 B
Swift
16 lines
826 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %empty-directory(%t-scratch)
|
|
// RUN: %target-swift-frontend -emit-module -o %t-scratch/def_distributed~partial.swiftmodule -primary-file %S/Inputs/def_distributed.swift -module-name def_distributed -disable-availability-checking
|
|
// RUN: %target-swift-frontend -merge-modules -emit-module -parse-as-library -enable-testing %t-scratch/def_distributed~partial.swiftmodule -module-name def_distributed -o %t/def_distributed.swiftmodule -disable-availability-checking
|
|
// RUN: %target-swift-frontend -typecheck -I%t -verify %s -verify-ignore-unknown -disable-availability-checking
|
|
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: distributed
|
|
|
|
import Distributed
|
|
import def_distributed
|
|
|
|
func testDoSomethingDistributed(system: LocalTestingDistributedActorSystem) {
|
|
let _: DA = DA(actorSystem: system)
|
|
}
|