<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div>On May 19, 2017, at 10:10, Edward Connell via swift-users &lt;<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">I just switched to the 5/17 swift 4.0 tool chain on Linux, and I am getting the following complaint when using swap on array elements. Is this warning legitimate because of a copy on write issue? If so, is there some new swap function for array elements? I realize I can turn 1 line into 3 and do the swapping myself, it's just verbose.<div><br></div><div><div><i>warning: simultaneous accesses to var 'dims', but modification requires exclusive access; consider copying to a local variable</i></div><div><i>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; swap(&amp;dims[lastIndex], &amp;dims[lastIndex-1])</i></div></div></div></div></blockquote><br><div>Looks like it got changed to "swapAt":&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0173-swap-indices.md">https://github.com/apple/swift-evolution/blob/master/proposals/0173-swap-indices.md</a></div><div><br></div><div>Hope that helps,</div><div>- Dave Sweeris&nbsp;</div></body></html>