<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Sep 12, 2017, at 12:48 PM, Adam Kemp 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 class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">@IBAction func buttonDidClick(sender:AnyObject) {</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> beginAsync {</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> let image = await processImage(downloadImage(), resize: self.resizeSwitch.isOn)</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> displayImage(image)</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> }</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">}</div></div></blockquote><br class=""></div><div>Would it be possible to actually fix this? That is, make the code covered by the `await` evaluate synchronous subexpressions first, such that the code sample above is equivalent to this?</div><div><br class=""></div><div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>@IBAction func buttonDidClick(sender:AnyObject) {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span> beginAsync {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>let $temp1 = self.resizeSwitch.isOn</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>let $temp2 = await downloadImage()</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span> let image = await processImage($temp2, resize: $temp1)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span> displayImage(image)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span> }</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div class=""><div class=""><br class=""></div></div></div><div class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px;"><div class=""><div style="font-size: 12px; " class="">-- </div><div style="font-size: 12px; " class="">Brent Royal-Gordon</div><div style="font-size: 12px; " class="">Architechies</div></div></span>
</div>
<br class=""></body></html>