Files
swift-mirror/validation-test/Evolution/Inputs/class_resilient_add_virtual_method.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