mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
16 lines
243 B
Swift
16 lines
243 B
Swift
public struct SpecialInt {
|
|
public var value = 0
|
|
public init() {}
|
|
}
|
|
|
|
prefix operator +++ {}
|
|
postfix operator +++ {}
|
|
|
|
prefix public func +++(base: inout SpecialInt) {
|
|
base.value += 2
|
|
}
|
|
|
|
postfix public func +++(base: inout SpecialInt) {
|
|
}
|
|
|