Files
swift-mirror/test/Serialization/Inputs/struct_with_operators.swift
Chris Lattner 57cd2506ff Change "operator infix" to "infix operator" for consistency with the rest of the declaration
modifiers and with the func implementations of the operators.  This resolves the rest of:
<rdar://problem/17527000> change operator declarations from "operator prefix" to "prefix operator" & make operator a keyword




Swift SVN r19931
2014-07-14 16:39:10 +00:00

17 lines
284 B
Swift

public struct SpecialInt {
public var value = 0
public init() {}
}
prefix operator +++ {}
postfix operator +++ {}
prefix public func +++(inout base: SpecialInt) {
base.value += 2
}
postfix public func +++(inout base: SpecialInt) {
println("use the prefix form instead")
}