<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=""><div class="">I agree an expression like `x==2`, not being passed on or assigned to anything, should generate a warning and a helpful fixit. No reason to make it an error.</div><div class=""><br class=""></div><div class="">Implicit return doesn’t change this AFAICT.</div><br class=""><div class="">
<div class="">— Radek</div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 12 Feb 2016, at 00:41, Jonathan Tang via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 11, 2016 at 3:32 PM, Amir Michail via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It’s too easy to accidentally write “x==2” instead of “x=2”.<br class="">
<br class="">
I don’t think something like “x==2” should be a valid statement.<br class=""></blockquote><div class=""><br class=""></div><div class="">I'd love to see this become a compiler warning. Unsure about making it an error; how would it affect implicit return from lambdas? </div></div></div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>