Files
swift-mirror/test/Concurrency/attr_execution/cross_module.swift
Pavel Yaskevich ace6f738ba [Serialization] Move nonisolated(nonsending) isolation kind above global actor one
Global actor kind also appends type offset that indicates what
global actor to use with the type. All of the isolation kinds
should be placed above it to make sure that there is never a
clash when i.e. `MainActor` is serialized as id `1`.

Resolves: rdar://153487603
2025-07-14 14:24:08 -07:00

31 lines
848 B
Swift

// RUN: %empty-directory(%t/src)
// RUN: split-file %s %t/src
/// Build the library A
// RUN: %target-swift-frontend -emit-module %t/src/A.swift \
// RUN: -module-name A -swift-version 6 -enable-library-evolution \
// RUN: -emit-module-path %t/A.swiftmodule \
// RUN: -emit-module-interface-path %t/A.swiftinterface
// Build the client using module
// RUN: %target-swift-emit-sil -verify -module-name Client -I %t %t/src/Client.swift
// RUN: rm %t/A.swiftmodule
// Re-build the client using interface
// RUN: %target-swift-emit-sil -verify -module-name Client -I %t %t/src/Client.swift
//--- A.swift
@MainActor
public final class Test {
public func test(_: @escaping @Sendable @MainActor () -> Void) {}
}
//--- Client.swift
import A
@MainActor
func test(t: Test, fn: @escaping @Sendable @MainActor () -> Void) {
t.test(fn) // Ok
}