<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Le 13 oct. 2017 à 23:23, Mike Kluev via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">On 13 October 2017 at 21:15, Jean-Daniel <span dir="ltr" class="">&lt;<a href="mailto:mailing@xenonium.com" target="_blank" class="">mailing@xenonium.com</a>&gt;</span> wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">I don’t think this is a good idea to make discardable part of the function type.<div class=""><br class=""></div><div class="">What would fun(callback: () -&gt; discardable Int) would means ?&nbsp;</div></div></blockquote><div class=""><br class=""></div><div class="">you mean this?</div><div class=""><br class=""></div><div class="">func foo(callback: () -&gt; discardable Int) {</div><div class="">&nbsp; &nbsp; ...</div><div class="">&nbsp; &nbsp; let x = callback()</div><div class="">&nbsp; &nbsp; ...</div><div class="">&nbsp; &nbsp; callback() // no warning or error here</div><div class="">}</div><div class=""><br class=""></div><div class="">Mike</div><div class=""><br class=""></div></div></div></div></div></blockquote><br class=""></div><div>I mean:</div><div><br class=""></div><div>func foo() -&gt; Int { … }</div><div><br class=""></div><div>func bar(callback: () -&gt; discardable Int) { … }</div><div><br class=""></div><div>bar(foo) // does it warns ?</div><div>bar({ 3 }) // does it warns ? If it does, how to avoid it ?</div><div><br class=""></div><div><br class=""></div></body></html>