Files
swift-mirror/test/Availability/api-availability-only.swift
Allan Shortlidge 897a74f495 Tests: Move some availability tests into a new test/Availability directory.
Un-reverts 9c01ee2c1b.

Also, add myself as a reviewer for more availability related files.

NFC.
2025-06-23 15:57:34 -07:00

14 lines
396 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 52, *)
public struct S {}
@available(macOS 51, *)
public func newFunc() {
_ = S() // expected-error {{'S' is only available in}}
// expected-note @-1 {{add 'if #available' version check}}
}