Files
swift-mirror/test/Sema/api-availability-only.swift
Allan Shortlidge a58ad6ba33 Frontend: Remove support for the -check-api-availability-only flag.
The functionality for this flag is no longer necessary because the emit module jobs for deprecated architectures no longer use an artificially low deployment target.

Resolves rdar://104758113
2023-03-23 23:02:13 -07:00

14 lines
402 B
Swift

/// Verify that -check-api-availability-only has no effect since it is deprecated.
// RUN: %target-typecheck-verify-swift -check-api-availability-only -verify
// REQUIRES: OS=macosx
@available(macOS 10.52, *)
public struct S {}
@available(macOS 10.51, *)
public func newFunc() {
_ = S() // expected-error {{'S' is only available in}}
// expected-note @-1 {{add 'if #available' version check}}
}