File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,33 @@ CHANGELOG
23
23
24
24
</details >
25
25
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
+
26
53
Swift 5.2
27
54
---------
28
55
@@ -7856,6 +7883,7 @@ Swift 1.0
7856
7883
[SE- 0252 ]: < https: // github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md>
7857
7884
[SE- 0253 ]: < https: // github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md>
7858
7885
[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>
7859
7887
7860
7888
[SR- 106 ]: < https: // bugs.swift.org/browse/SR-106>
7861
7889
[SR- 419 ]: < https: // bugs.swift.org/browse/SR-419>
You can’t perform that action at this time.
0 commit comments