Files
swift-mirror/test/attr/Inputs/OldAndNew.swift
Nathan Hawes 9bcb54910e [AST] Prefer the 'macOS' spelling over 'OSX' when printing the platform kind.
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
2020-07-08 13:51:25 -07:00

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
}