- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathavailability_macosx_canonical_versions.swift
20 lines (17 loc) · 955 Bytes
/
availability_macosx_canonical_versions.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t %s -disable-objc-attr-requires-foundation-module
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse-as-library %t/availability_macosx_canonical_versions.swiftmodule -typecheck -verify -emit-objc-header-path %t/availability.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module
// RUN: %FileCheck %s < %t/availability.h
// RUN: %check-in-clang %t/availability.h
// REQUIRES: objc_interop
// CHECK-LABEL: @interface Availability{{$}}
// CHECK-NEXT: - (void)alwaysAvailable;
// CHECK-NEXT: - (void)introducedOn10_16
// CHECK-DAG: SWIFT_AVAILABILITY(macos,introduced=11.0)
// CHECK-DAG: SWIFT_AVAILABILITY(ios,introduced=10.16)
@objcclassAvailability{
@objcfunc alwaysAvailable(){}
@available(macOS 10.16,*)
@available(iOS, introduced:10.16)
@objcfunc introducedOn10_16(){}
}