<div dir="ltr"><span style="font-size:13px">Filed:</span><div style="font-size:13px"><a href="https://bugs.swift.org/browse/SR-245" target="_blank">https://bugs.swift.org/browse/SR-245</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 11:54 PM, Dave Abrahams <span dir="ltr"><<a href="mailto:dabrahams@apple.com" target="_blank">dabrahams@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Dec 14, 2015, at 11:04 AM, Jens Persson via swift-dev <<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>> wrote:</div><br><div><div dir="ltr" style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Yes, and I don't know if there is any particular reason why the == operator for Int doesn't have @warn_unused_result while the one for Doubles has:<div><br><div><div>func f() { 1 == 2 } // OK</div><div>func g() { 1.0 == 2.0 } // Warning: Result of call '==' is unused</div></div></div></div></div></blockquote><div><br></div></span>That’s an oversight; please file a radar!</div><div><div class="h5"><div><br><blockquote type="cite"><div><div class="gmail_extra" style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><div class="gmail_quote">On Mon, Dec 14, 2015 at 7:40 PM, Johan Jensen<span> </span><span dir="ltr"><<a href="mailto:jj@johanjensen.dk" target="_blank">jj@johanjensen.dk</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>Because currently only unused variable/constant declarations have warnings/fix-its attached to them.<br></div>There have been some discussion on making<span> </span><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001580.html" target="_blank">non-void functions warn of unused results</a><span> </span>and it’s possible that this would be in style with that.<br>Perhaps (basically) empty statements should also give a warning?<br><br></div>—Johan<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Dec 14, 2015 at 7:08 PM, Jens Persson via swift-dev<span> </span><span dir="ltr"><<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>></span><span> </span>wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr"><div><div>func ok() {</div><div> <span> </span>let s = "see"; "Why are there exactly "</div><div> <span> </span>0 == 0 * 42</div><div> <span> </span>"warnings and errors in this code"</div><div> <span> </span>let t = s + "?"</div><div> <span> </span>print(t)</div><div>}</div><div>ok() // see?</div><div><br></div></div></div></div></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=KlmFWKNIEcyPEGx2Wqruu-2FaM6I0anrxIOlKS1pgqec7XjWL7MUftMlhh6AP4DKmBe9FNIPalj-2Banwi9aWZ00mg7yb3bvLaH-2BypHL3fBT46k2mowcTDHefATzPuqqeC0zD3HfnE20kUTTunTesmEOVkWiI1FxyLZ9-2BrpTwBAGOa6yFh4wblggPw9rR-2BQE3L81i85e0kjXuIYp-2FGC496ILm03JBgkTauoEZ3DAf01cLAM-3D" alt="" height="1" border="0" width="1" style="min-height:1px!important;width:1px!important;border-width:0px!important;margin:0px!important;padding:0px!important"><span> </span><br>_______________________________________________<br>swift-dev mailing list<br><a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-dev</a><br><br></blockquote></div><br></div></blockquote></div><br><br clear="all"><div><br></div>--<span> </span><br><div>bitCycle AB | Smedjegatan 12 | 742 32 Östhammar | Sweden<br><a href="http://www.bitcycle.com/" target="_blank">http://www.bitcycle.com/</a><br>Phone: +46-73-753 24 62<br>E-mail:<span> </span><a href="mailto:jens@bitcycle.com" target="_blank">jens@bitcycle.com</a><br><br></div></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=JfMPa-2F7wwZPzsZ3QKA8NjtONIYX4SjbWuUxtpfsTY2ibUAdT4JeAT9A2UznBuNp-2Ftd9xDWYtJJgcGPnXvL-2F9FA-2FTZjAs4YDUHQCOqdlmiUc6R3Bzzszj3Tqx-2B6fl6XQDqPqXuLDJamBRl9KbvpkjwWB1AGtFdJ2yfqnidab3L-2FfDn-2BYOm9cJnaOpfOi5fUo-2BawaJDGJrpv8wZ-2BLqP1qXNBZjCfeZ-2BJui7ParK-2FIdiMs-3D" alt="" width="1" height="1" border="0" style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;min-height:1px!important;width:1px!important;border-width:0px!important;margin:0px!important;padding:0px!important"><span style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"><span> </span>_______________________________________________</span><br style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">swift-dev mailing list</span><br style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:swift-dev@swift.org" style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">swift-dev@swift.org</a><br style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="https://lists.swift.org/mailman/listinfo/swift-dev" style="font-family:AvenirNext-Regular;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://lists.swift.org/mailman/listinfo/swift-dev</a></div></blockquote></div><br></div></div><span class="HOEnZb"><font color="#888888"><div>
-Dave<div><br></div><br>
</div>
<br></font></span></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">bitCycle AB | Smedjegatan 12 | 742 32 Östhammar | Sweden<br><a href="http://www.bitcycle.com/" target="_blank">http://www.bitcycle.com/</a><br>Phone: +46-73-753 24 62<br>E-mail: <a href="mailto:jens@bitcycle.com" target="_blank">jens@bitcycle.com</a><br><br></div>
</div>