mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Completely mechanical changes: - Explicit @objc in a few places - Some imported APIs changed - For the mix-and-match tests, just test version 4/5 instead of 3/4
32 lines
828 B
Swift
32 lines
828 B
Swift
// CHECK: @available(swift 5.0)
|
|
// CHECK-NEXT: func fiveOnly() -> Int
|
|
@available(swift, introduced: 5.0)
|
|
public func fiveOnly() -> Int {
|
|
return 4
|
|
}
|
|
|
|
// CHECK: @available(swift 5.0)
|
|
// CHECK-NEXT: @available(OSX 10.1, *)
|
|
// CHECK-NEXT: func fiveOnlyWithMac() -> Int
|
|
@available(swift, introduced: 5.0)
|
|
@available(macOS, introduced: 10.1)
|
|
public func fiveOnlyWithMac() -> Int {
|
|
return 4
|
|
}
|
|
|
|
// CHECK: @available(swift 5.0)
|
|
// CHECK-NEXT: @available(OSX 10.1, *)
|
|
// CHECK-NEXT: func fiveOnlyWithMac2() -> Int
|
|
@available(macOS, introduced: 10.1)
|
|
@available(swift, introduced: 5.0)
|
|
public func fiveOnlyWithMac2() -> Int {
|
|
return 4
|
|
}
|
|
|
|
// CHECK: @available(swift, introduced: 4.0, obsoleted: 5.0)
|
|
// CHECK-NEXT: func fourOnly() -> Int
|
|
@available(swift, introduced: 4.0, obsoleted: 5.0)
|
|
public func fourOnly() -> Int {
|
|
return 3
|
|
}
|