File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,29 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
5
5
6
6
## Swift 5.7
7
7
8
+ * [ SE-0345] [ ] :
9
+
10
+ It is now possible to unwrap optional variables with a shorthand syntax that
11
+ shadows the existing declaration. For example, the following:
12
+
13
+ ``` swift
14
+ let foo: String ? = " hello world"
15
+
16
+ if let foo {
17
+ print (foo) // prints "hello world"
18
+ }
19
+ ```
20
+
21
+ is equivalent to:
22
+
23
+ ``` swift
24
+ let foo: String ? = " hello world"
25
+
26
+ if let foo = foo {
27
+ print (foo) // prints "hello world"
28
+ }
29
+ ```
30
+
8
31
* [ SE-0340] [ ] :
9
32
10
33
It is now possible to make declarations unavailable from use in asynchronous
@@ -9095,6 +9118,7 @@ Swift 1.0
9095
9118
[SE- 0336 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0336-distributed-actor-isolation.md>
9096
9119
[SE- 0343 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0343-top-level-concurrency.md>
9097
9120
[SE- 0340 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0340-swift-noasync.md>
9121
+ [SE- 0345 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md>
9098
9122
9099
9123
[SR- 75 ]: < https: // bugs.swift.org/browse/SR-75>
9100
9124
[SR- 106 ]: < https: // bugs.swift.org/browse/SR-106>
You can’t perform that action at this time.
0 commit comments