Details
-
Type:
Bug
-
Status: Open
-
Priority:
Medium
-
Resolution: Unresolved
-
Component/s: Compiler
-
Labels:
Description
The following code
func mapping <A, B, C> (f: (A) -> (B)) -> (((C, B) -> (C))) -> ((C, A) -> (C)) { return { reducer in return { accum, input in reducer(accum, f(input)) } } }
Should suggest that we insert @escaping in two places such that the final signature is
func mapping <A, B, C> (f: @escaping (A) -> (B)) -> (@escaping ((C, B) -> (C))) -> ((C, A) -> (C))
However, it only chooses to offer a fixit for the leftmost @escaping and reports the rightmost one as escaping without a fixit. We should diagnose both consistently and offer a fixit.
Attachments
Issue Links
- is duplicated by
-
SR-5455 Compiler not able to provide automatic fix-it for returning closure
-
- Resolved
-