Skip to content

Commit 7fd1bf5

Browse files
committed
[ChangeLog] Add an entry for SE-0347
(cherry picked from commit 5acdd11)
1 parent 718257e commit 7fd1bf5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)