Appcode array sort vs sorted

已完成

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(). 

0

Never mind. Things work correctly with array.sort(). I had accidentally marked the array as constant.

0

请先登录再写评论。