mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
33 lines
378 B
Swift
33 lines
378 B
Swift
|
|
#if BEFORE
|
|
|
|
open class AddStoredProperty {
|
|
public let x: Int
|
|
|
|
public init(x: Int) {
|
|
self.x = x
|
|
}
|
|
|
|
public func get() -> (Int, Int) {
|
|
return (x, -x)
|
|
}
|
|
}
|
|
|
|
#else
|
|
|
|
open class AddStoredProperty {
|
|
public let x: Int
|
|
public let y: Int
|
|
|
|
public init(x: Int) {
|
|
self.x = x
|
|
self.y = -x
|
|
}
|
|
|
|
public func get() -> (Int, Int) {
|
|
return (x, y)
|
|
}
|
|
}
|
|
|
|
#endif
|