mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This allows library authors to change the type of a computed property from one Swift version to the next.
32 lines
755 B
Swift
32 lines
755 B
Swift
public class BeforeAndAfterOther {
|
|
@available(swift, obsoleted: 4.0)
|
|
public init(foo: ()) {}
|
|
|
|
@available(swift 4.0)
|
|
public init?(foo: ()) {}
|
|
|
|
@available(swift, obsoleted: 4.0)
|
|
public init() {}
|
|
|
|
@available(swift 4.0)
|
|
public init() throws {}
|
|
|
|
@available(swift, obsoleted: 4.0)
|
|
public static func foo() {}
|
|
|
|
@available(swift 4.0)
|
|
public static func foo() throws {}
|
|
|
|
@available(swift 4.0)
|
|
public var computed: Int16 { get { return 0 } set { } }
|
|
|
|
@available(swift, obsoleted: 4.0)
|
|
public var computed: Int8 { get { return 0 } set { } }
|
|
|
|
@available(swift 4.0)
|
|
public static var computed: Int16 { get { return 0 } set { } }
|
|
|
|
@available(swift, obsoleted: 4.0)
|
|
public static var computed: Int8 { get { return 0 } set { } }
|
|
}
|