File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,20 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
55
66## Swift 5.7
77
8+ * [ SE-0347] [ ] :
9+
10+ It's now possible to use a default value expression with a generic parameter type
11+ to default the argument and its type:
12+
13+ ```
14+ func compute<C: Collection>(_ values: C = [0, 1, 2]) {
15+ ...
16+ }
17+ ```
18+
19+ ` compute ` is now accepted by compiler and ` [Int] ` is going to be inferred
20+ for ` C ` at call sites that do not provide the argument explicitly.
21+
822* [ SE-0326] [ ] :
923
1024 It's now possible to infer parameter and result types from the body of a multi-statement
@@ -9150,6 +9164,7 @@ Swift 1.0
91509164[SE- 0340 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0340-swift-noasync.md>
91519165[SE- 0345 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md>
91529166[SE- 0326 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0326-extending-multi-statement-closure-inference.md>
9167+ [SE- 0347 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0347-type-inference-from-default-exprs.md>
91539168
91549169[SR- 75 ]: < https: // bugs.swift.org/browse/SR-75>
91559170[SR- 106 ]: < https: // bugs.swift.org/browse/SR-106>
You can’t perform that action at this time.
0 commit comments