<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 7, 2016, at 10:06 AM, Chris Lattner &lt;<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 7, 2016, at 1:44 AM, Dennis Weissmann via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Neil,<div class=""><br class=""></div><div class="">indeed the compiler should be able to infer the type here.</div><div class=""><br class=""></div><div class="">The error message in the latest development snapshot (swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a) is a little better:</div></div></div></blockquote><div class=""><br class=""></div><div class="">Yep, further improvements are tracked by:</div><div class=""><div class="">&lt;<a href="rdar://problem/24209966" class="">rdar://problem/24209966</a>&gt; QoI: When a non-single-expression closure type can't be inferred, say that we didn't look at the body</div><div class=""><div class="">&lt;<a href="rdar://problem/22123191" class="">rdar://problem/22123191</a>&gt; QoI: multi-line closure with failure to infer result type should add a fixit</div></div></div></div></div></div></blockquote><br class=""></div><div>Oops, sorry, those are internal bugs, not external ones. &nbsp;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”.</div><div><br class=""></div><div>-Chris</div><br class=""></body></html>