Appcode array sort vs sorted
Completed
Cannot compile Swift 3 code that uses in place sort for arrays. Swift 3 changed from array.sort() to array.sorted(), and array.sortInPlace to array.sort(). This was a VERY bad move by Apple as it changed the implementation and behavior of array.sort().
Appcode now marks array.sort() it as an error, saying it has been replaced by sorted() (which is true), but now it makes it impossible to compile an in-place sort using array.sort().
Please sign in to leave a comment.
Never mind. Things work correctly with array.sort(). I had accidentally marked the array as constant.