File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,22 @@ CHANGELOG
23
23
24
24
Swift 5.0
25
25
---------
26
+ * [ SR-5719] [ ] :
27
+
28
+ Starting from ` -swift-version 5 ` , implicit ` @autoclosure ` function type
29
+ forwarding has been disabled, and new a diagnostic has been added suggesting
30
+ to add ` () ` to call the function value in such case. The call itself would be
31
+ wrapped in an implicit closure and passed to the corresponding parameter.
32
+
33
+ Example:
34
+
35
+ ``` swift
36
+ func foo (_ fn : @autoclosure () -> Int ) {}
37
+ func bar (_ fn : @autoclosure () -> Int ) {
38
+ foo (fn) // Incorrect, `fn` can't be forwarded and has to be called
39
+ foo (fn ()) // Ok
40
+ }
41
+ ```
26
42
27
43
* [ SR-7139] [ ] :
28
44
@@ -7306,3 +7322,4 @@ Swift 1.0
7306
7322
[SR- 4248 ]: < https: // bugs.swift.org/browse/SR-4248>
7307
7323
[SR- 7139 ]: < https: // bugs.swift.org/browse/SR-7139>
7308
7324
[SR- 7251 ]: < https: // bugs.swift.org/browse/SR-7251>
7325
+ [SR- 5719 ]: < https: // bugs.swift.org/browse/SR-5719>
You can’t perform that action at this time.
0 commit comments