mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
44 lines
562 B
Swift
44 lines
562 B
Swift
|
|
public func getVersion() -> Int {
|
|
#if BEFORE
|
|
return 0
|
|
#else
|
|
return 1
|
|
#endif
|
|
}
|
|
|
|
#if BEFORE
|
|
|
|
public class AddVirtualMethod {
|
|
public init() {}
|
|
|
|
public func firstMethod() -> Int {
|
|
return 1
|
|
}
|
|
|
|
public func secondMethod() -> Int {
|
|
return 2
|
|
}
|
|
}
|
|
|
|
#else
|
|
|
|
public class AddVirtualMethod {
|
|
// Note: methods were re-ordered, new method added in the middle
|
|
public func secondMethod() -> Int {
|
|
return 2
|
|
}
|
|
|
|
public func thirdMethod() -> Int {
|
|
return 3
|
|
}
|
|
|
|
public func firstMethod() -> Int {
|
|
return 1
|
|
}
|
|
|
|
public init() {}
|
|
}
|
|
|
|
#endif
|