We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c01ee2 commit 7c78224Copy full SHA for 7c78224
test/Availability/operator_availability.swift
@@ -29,3 +29,20 @@ func testAvailability() {
29
_ = (1 as Int32) <=< (1 as Int32) // okay
30
_ = (1 as Int32) >=> (1 as Int32) // expected-error{{'>=>' is unavailable}}
31
}
32
+
33
+// rdar://problem/152700122
34
+infix operator ~>
35
+public func ~><T> (lhs: T, rhs: (T) -> Void) -> T {
36
+ fatalError()
37
+}
38
39
+struct S {
40
+ @available(macOS 20, *)
41
+ func f() {}
42
43
44
+let s = S() ~> {
45
+ if #available(macOS 20.0, *) {
46
+ $0.f()
47
+ }
48
0 commit comments