<html><body><div>Many thanks. &nbsp;It works in Swift 4 Xcode 9 beta2.</div><div><br>On Jun 30, 2017, at 11:20 AM, Daniel Dunbar &lt;daniel_dunbar@apple.com&gt; wrote:<br><br></div><div><blockquote type="cite"><div class="msg-quote" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" data-mce-style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">This is due to SE-0110:<div class="">&nbsp; <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0110-distingish-single-tuple-arg.md" class="" rel="noreferrer" data-mce-href="https://github.com/apple/swift-evolution/blob/master/proposals/0110-distingish-single-tuple-arg.md">https://github.com/apple/swift-evolution/blob/master/proposals/0110-distingish-single-tuple-arg.md</a></div><div class="">but see the additional commentary:</div><div class="">&nbsp;&nbsp;<a href="https://lists.swift.org/pipermail/swift-evolution-announce/2017-June/000386.html" class="" rel="noreferrer" data-mce-href="https://lists.swift.org/pipermail/swift-evolution-announce/2017-June/000386.html">https://lists.swift.org/pipermail/swift-evolution-announce/2017-June/000386.html</a></div><div class=""><br class=""></div><div class="">For now you can rewrite it as:</div><div class="">```</div><div class=""><div class="">let filenamelength = bytes</div><div class="">&nbsp; .enumerated()</div><div class="">&nbsp; .map {</div><div class="">&nbsp; &nbsp; let (index, element) = $0</div><div class="">&nbsp; &nbsp; return Int(Double(element) * pow(256,Double(index))) }</div><div class="">&nbsp; .reduce(0, +)</div><div class="">```</div><div class=""><br class=""></div><div class="">&nbsp;- Daniel</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Jun 29, 2017, at 8:08 PM, CK TUNG via swift-users &lt;<a href="mailto:swift-users@swift.org" class="" data-mce-href="mailto:swift-users@swift.org">swift-users@swift.org</a>&gt; wrote:</div><div class=""><div class=""><div class="">I have the following code snippet that compile OK in swift 3</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;bytes = Array(UnsafeBufferPointer(....))</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let filenamelength = bytes[(i+28)..&lt;(i+28+2)]</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .enumerated()</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .map { (index, element) in return Int(Double(element) * pow(256,Double(index))) }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .reduce(0, +)</div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;">&nbsp;<br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;"><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;">I have the following code snippet that compile OK in swift 3</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;"><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;">In Swift 4 (Xcode beta1) it compiled with error something like "... too complex"</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;"><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;">Now in Swift 4 Xocde beta2 the error is&nbsp;</span><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;">tuple parameter element does not support destructing</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;"><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;">what has been changed in swift 4 ?</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;"><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;"><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;"><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;">Please help how to solve it ?</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;"><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;"><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;"><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;">Thanks</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;" class="" data-mce-style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: #008400; min-height: 13px;"><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;" class="" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; float: none; display: inline !important;"><br class=""></span></div></div></div>_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="" data-mce-href="mailto:swift-users@swift.org">swift-users@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" data-mce-href="https://lists.swift.org/mailman/listinfo/swift-users">https://lists.swift.org/mailman/listinfo/swift-users</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div></body></html>