Skip to content

Commit 48ba315

Browse files
Jumhyntheblixguy
andcommitted
Add SE-0269 to the changelog (swiftlang#29285)
* Add SE-0269 to the changelog * Add missing quote * Add link for SE-0269 * Add swift language annotation to code block Co-Authored-By: Suyash Srijan <[email protected]> * Fix typo Co-authored-by: Suyash Srijan <[email protected]>
1 parent d3f7215 commit 48ba315

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,33 @@ CHANGELOG
2323

2424
</details>
2525

26+
Swift Next
27+
----------
28+
29+
* [SE-0269][]:
30+
31+
When an escaping closure explicitly captures `self` in its capture list, the
32+
use of implicit `self` is enabled within that closure. This means that the
33+
following code is now valid:
34+
35+
```swift
36+
func doStuff(_ stuff: @escaping () -> Void) {}
37+
38+
class C {
39+
var x = 0
40+
41+
func method() {
42+
doStuff { [self] in
43+
x += 1
44+
}
45+
}
46+
}
47+
```
48+
49+
This proposal also introduces new diagnostics for inserting `self` into the
50+
closure's capture list in addition to the existing 'use `self.` explicitly'
51+
fix-it.
52+
2653
Swift 5.2
2754
---------
2855

@@ -7856,6 +7883,7 @@ Swift 1.0
78567883
[SE-0252]: <https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md>
78577884
[SE-0253]: <https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md>
78587885
[SE-0254]: <https://github.com/apple/swift-evolution/blob/master/proposals/0254-static-subscripts.md>
7886+
[SE-0269]: <https://github.com/apple/swift-evolution/blob/master/proposals/0269-implicit-self-explicit-capture.md>
78597887

78607888
[SR-106]: <https://bugs.swift.org/browse/SR-106>
78617889
[SR-419]: <https://bugs.swift.org/browse/SR-419>

0 commit comments

Comments
 (0)