Files
swift-mirror/test/SILGen/Inputs/availability_overloads_other.swift
Slava Pestov 4da26110fd Allow overloads of properties with non-overlapping availability
This allows library authors to change the type of a computed
property from one Swift version to the next.
2017-03-27 21:07:37 -07:00

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 { } }
}