Files
swift-mirror/test/attr/attr_backDeployed_availability_extension.swift
Allan Shortlidge 432c6688d8 Sema: Relax @backDeployed availability conflict diagnostics.
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
2023-03-29 16:19:58 -07:00

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() {}
}