Skip to content

Commit 144be6c

Browse files
committed
CHANGELOG: Add entry for #41849 and #41978
1 parent 97eb772 commit 144be6c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
55

66
## Swift 5.7
77

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+
class Object {
12+
@objc func getTag() -> Int
13+
}
14+
15+
@objc protocol P {
16+
@objc optional func didUpdateObject(withTag tag: Int)
17+
}
18+
19+
let getTag: (AnyObject) -> (() -> Int)? = AnyObject.getTag
20+
21+
let didUpdateObject: (any P) -> ((Int) -> Void)? = P.didUpdateObject
22+
```
23+
824
* [SE-0349][]:
925

1026
Loading data from raw memory represented by `UnsafeRawPointer`,

0 commit comments

Comments
 (0)