[swift-users] Compiler can't infer map transfer closure return type?

Chris Lattner clattner at apple.com
Mon Mar 7 12:07:36 CST 2016

> On Mar 7, 2016, at 10:06 AM, Chris Lattner <clattner at apple.com> wrote:
>> On Mar 7, 2016, at 1:44 AM, Dennis Weissmann via swift-users <swift-users at swift.org <mailto:swift-users at swift.org>> wrote:
>> Hi Neil,
>> indeed the compiler should be able to infer the type here.
>> The error message in the latest development snapshot (swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a) is a little better:
> Yep, further improvements are tracked by:
> <rdar://problem/24209966 <rdar://problem/24209966>> QoI: When a non-single-expression closure type can't be inferred, say that we didn't look at the body
> <rdar://problem/22123191 <rdar://problem/22123191>> QoI: multi-line closure with failure to infer result type should add a fixit

Oops, sorry, those are internal bugs, not external ones.  In any case, the intent is clear: we should say why we failed to infer the type, and do further analysis in the error case to produce a fixit when we can tell what was “meant”.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160307/e4146336/attachment.html>

More information about the swift-users mailing list