mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The `@MainActor` global actor constraint on a declaration does not carry an inherent ABI impact and therefore use of this constraint should not be limited to OS versions where Swift concurrency is available. Resolves rdar://105610970
15 lines
694 B
Swift
15 lines
694 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -module-name Library
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -module-name Library
|
|
// RUN: %FileCheck %s < %t/Library.swiftinterface
|
|
|
|
// REQUIRES: OS=macosx
|
|
|
|
import AppKit
|
|
|
|
// CHECK: @objc @_inheritsConvenienceInitializers @_Concurrency.MainActor(unsafe) public class Subclass : AppKit.NSView {
|
|
public class Subclass: NSView {
|
|
// CHECK: @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame frameRect: Foundation.NSRect)
|
|
// CHECK: @_Concurrency.MainActor(unsafe) @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
}
|