mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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
45 lines
790 B
Swift
45 lines
790 B
Swift
infix operator %%% {
|
|
associativity left
|
|
precedence 200
|
|
}
|
|
|
|
public func %%% (lhs: Int, rhs: Int) -> Int {
|
|
return lhs + rhs
|
|
}
|
|
|
|
public func visibleImport() {}
|
|
public func hiddenImport() {}
|
|
|
|
public func overlayedFoo() {}
|
|
|
|
/// FooSwiftStruct Aaa.
|
|
/**
|
|
* Bbb.
|
|
* Ccc.
|
|
*/
|
|
public struct FooSwiftStruct {
|
|
// Indentation is incorrect on purpose, don't fix this.
|
|
|
|
/// fooInstanceFunc Aaa.
|
|
/**
|
|
* Bbb
|
|
*/
|
|
/**
|
|
* Ccc.
|
|
*/
|
|
public func fooInstanceFunc() {}
|
|
public init() {}
|
|
}
|
|
public struct BarGenericSwiftStruct1<T> {
|
|
public init(t: T) {}
|
|
public func bar1InstanceFunc() {}
|
|
}
|
|
public protocol BarProtocol {
|
|
func instanceFunc()
|
|
}
|
|
public struct BarGenericSwiftStruct2<T: BarProtocol, U> {
|
|
public init(t: T, u: U) {}
|
|
public func bar2InstanceFunc() {}
|
|
}
|
|
|