Skip to content

Commit 9d047d9

Browse files
authored
Merge pull request #27828 from slavapestov/changelog-entry-local-default-arg-captures
Changelog entry for #27220
2 parents 049d56a + 317e97c commit 9d047d9

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
@@ -26,6 +26,21 @@ CHANGELOG
2626
Swift 5.2
2727
---------
2828

29+
* [SR-2189][]:
30+
31+
The compiler now supports local functions whose default arguments capture
32+
values from outer scopes.
33+
34+
```swift
35+
func outer(x: Int) -> (Int, Int) {
36+
func inner(y: Int = x) -> Int {
37+
return y
38+
}
39+
40+
return (inner(), inner(y: 0))
41+
}
42+
```
43+
2944
* [SR-11429][]:
3045

3146
The compiler will now correctly strip argument labels from function references
@@ -7803,6 +7818,7 @@ Swift 1.0
78037818
[SR-1529]: <https://bugs.swift.org/browse/SR-1529>
78047819
[SR-2131]: <https://bugs.swift.org/browse/SR-2131>
78057820
[SR-2176]: <https://bugs.swift.org/browse/SR-2176>
7821+
[SR-2189]: <https://bugs.swift.org/browse/SR-2189>
78067822
[SR-2388]: <https://bugs.swift.org/browse/SR-2388>
78077823
[SR-2394]: <https://bugs.swift.org/browse/SR-2394>
78087824
[SR-2608]: <https://bugs.swift.org/browse/SR-2608>

0 commit comments

Comments
 (0)