<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 <a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001580.html">non-void functions warn of unused results</a> 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">On Mon, Dec 14, 2015 at 7:08 PM, Jens Persson via swift-dev <span dir="ltr"><<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>func ok() {</div><div> let s = "see"; "Why are there exactly "</div><div> 0 == 0 * 42</div><div> "warnings and errors in this code"</div><div> let t = s + "?"</div><div> print(t)</div><div>}</div><div>ok() // see?</div><div><br></div></div>
</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=KlmFWKNIEcyPEGx2Wqruu-2FaM6I0anrxIOlKS1pgqec7XjWL7MUftMlhh6AP4DKmBe9FNIPalj-2Banwi9aWZ00mg7yb3bvLaH-2BypHL3fBT46k2mowcTDHefATzPuqqeC0zD3HfnE20kUTTunTesmEOVkWiI1FxyLZ9-2BrpTwBAGOa6yFh4wblggPw9rR-2BQE3L81i85e0kjXuIYp-2FGC496ILm03JBgkTauoEZ3DAf01cLAM-3D" alt="" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important" height="1" border="0" width="1">
<br>_______________________________________________<br>
swift-dev mailing list<br>
<a href="mailto:swift-dev@swift.org">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>