Skip to content

Commit 6f273fb

Browse files
committed
Add a CHANGELOG entry about allowing collection downcast in a cast pattern
1 parent 1f3e159 commit 6f273fb

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
@@ -4,6 +4,21 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
44

55
## Swift 5.8
66

7+
* [#56139][]:
8+
9+
Сollection downcasts in cast patterns are now supported. For example,
10+
11+
```swift
12+
func downcastCollection(_ arr: [Any]) {
13+
switch arr {
14+
case let ints as [Int]:
15+
// ...
16+
case is [Bool]:
17+
// ...
18+
}
19+
}
20+
```
21+
722
* [SE-0365][]:
823

924
Implicit `self` is now permitted for `weak self` captures, after `self` is unwrapped.
@@ -9624,3 +9639,4 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
96249639
[#54246]: <https://github.com/apple/swift/issues/54246>
96259640
[#57081]: <https://github.com/apple/swift/issues/57081>
96269641
[#57225]: <https://github.com/apple/swift/issues/57225>
9642+
[#56139]: <https://github.com/apple/swift/issues/56139>

0 commit comments

Comments
 (0)