mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This affects module interfaces, interface generation in sourcekitd, and diagnostics. Also fixes a fixit that was assuming the 'OSX' spelling when computing the source range to replace. Resolves rdar://problem/64667960
32 lines
832 B
Swift
32 lines
832 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(macOS 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(macOS 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
|
|
}
|