You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,22 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
5
5
6
6
## Swift 5.7
7
7
8
+
* References to `optional` methods on a protocol metatype, as well as references to dynamically looked up methods on the `AnyObject` metatype are now supported. These references always have the type of a function that accepts a single argument and returns an optional value of function type:
9
+
10
+
```swift
11
+
classObject {
12
+
@objcfuncgetTag() ->Int
13
+
}
14
+
15
+
@objcprotocolP {
16
+
@objcoptionalfuncdidUpdateObject(withTagtag: Int)
17
+
}
18
+
19
+
let getTag: (AnyObject) -> (() ->Int)?=AnyObject.getTag
20
+
21
+
let didUpdateObject: (any P) -> ((Int) ->Void)?= P.didUpdateObject
22
+
```
23
+
8
24
*[SE-0349][]:
9
25
10
26
Loading data from raw memory represented by `UnsafeRawPointer`,
@@ -98,7 +114,7 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
98
114
It's now possible to use a default value expression with a generic parameter type
99
115
to default the argument and its type:
100
116
101
-
```
117
+
```swift
102
118
funccompute<C: Collection>(_values: C = [0, 1, 2]) {
0 commit comments