mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Only diagnose `@backDeployed` as conflicting with unavailability if the attribute that is making the declaration unavailable is unconditional or it is for the same base platform. For example, it should be allowed to back deploy a function on macOS while making that function unavailable for application extensions on macOS. Resolves rdar://107291474
10 lines
328 B
Swift
10 lines
328 B
Swift
// RUN: %target-typecheck-verify-swift -parse-as-library
|
|
// RUN: %target-typecheck-verify-swift -parse-as-library -application-extension
|
|
|
|
@available(macOS 11, *)
|
|
@available(macOSApplicationExtension, unavailable)
|
|
public struct UnavailableMacOSExtensionsStruct {
|
|
@backDeployed(before: macOS 12)
|
|
public func memberFunc() {}
|
|
}
|