Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,33 @@ CHANGELOG

</details>

Swift Next
----------

* [SE-0269][]:

When an escaping closure explicitly captures `self` in its capture list, the
use of implicit `self` is enabled within that closure. This means that the
following code is now valid:

```swift
func doStuff(_ stuff: @escaping () -> Void) {}

class C {
var x = 0

func method() {
doStuff { [self] in
x += 1
}
}
}
```

This proposal also introduces new diagnostics for inserting `self` into the
closure's capture list in addition to the existing 'use `self.` explicitly'
fix-it.

Swift 5.2
---------

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

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