mirror of
https://github.com/apple/swift-system
synced 2026-11-29 05:24:25 +00:00
This was our previous convention:
/// Fiddle with the thing.
/*System 0.0.2*/
public func foo()
/// Fiddle with the thing.
/*System 0.0.2, @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)*/
public func foo()
/// Fiddle with the thing.
/*System 0.0.2*/@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
public func foo()
Unfortunately, regular comments in between a declaration and its
preceding doc comments interfere with documentation tools.
Change things to the style below instead:
/// Fiddle with the thing.
@available(/*System 0.0.2*/macOS 10, *)
public func foo()
/// Fiddle with the thing.
@available(/*SwiftSystem 0.0.2: macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0*/macOS 10, *)
public func foo()
/// Fiddle with the thing.
@available(/*SwiftSystem 0.0.2*/macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
public func foo()
Unfortunately, `@available(*)` isn’t valid syntax, so we have to
add a dummy “macOS 10” version spec. It should have no actual effect.