mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
26 lines
254 B
Swift
26 lines
254 B
Swift
public var count = 0
|
|
|
|
public func getVersion() -> Int {
|
|
#if BEFORE
|
|
return 0
|
|
#else
|
|
return 1
|
|
#endif
|
|
}
|
|
|
|
open class Base {
|
|
public init() {}
|
|
|
|
#if AFTER
|
|
deinit {
|
|
count += 1
|
|
}
|
|
#endif
|
|
}
|
|
|
|
open class Derived : Base {
|
|
deinit {
|
|
count += 10
|
|
}
|
|
}
|