Reputation: 1892
Here is the statement that's causing trouble. This worked perfectly in Swift 2.2 but is not working in 3.0 and Xcode 8.
keys = keys
.enumerated()
.filter { !indexesToRemove.contains($0.index) }
.map { $0.element }
Right at $0.index
xCode is throwing a compiler error:
Value of tuple type '(offset: Int, element: Any)' has no member 'index'
As far as I know $0 represents objects in the keys
array. What tuple is it talking about?
Upvotes: 0
Views: 441
Reputation: 93161
index
has been changed to offset
in Swift 3 (don't ask me why):
keys = keys
.enumerated()
.filter { !indexesToRemove.contains($0.offset) }
.map { $0.element }
Upvotes: 3