Additional Detail from JIRA
|
|
| Votes |
0 |
| Component/s |
Compiler |
| Labels |
Bug, DiagnosticsQoI |
| Assignee |
mkchoi212 (JIRA) |
| Priority |
Medium |
md5: 4f14ea42d651469b5c1a49e8c94f02a5
is duplicated by:
- SR-5455 Compiler not able to provide automatic fix-it for returning closure
Issue 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.
Additional Detail from JIRA
md5: 4f14ea42d651469b5c1a49e8c94f02a5
is duplicated by:
Issue Description:
The following code
Should suggest that we insert @escaping in two places such that the final signature is
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.