After the gloss project for Swift 4 in Xcode 9
I am getting following error which i have no idea
Closure tuple parameter \'(key: _, value: _)
I'm using Xcode 11.1 and Swift 5, and ran into this error while using enumerated().map()
. I think this example simplifies things a little, but in general this is what fixed it for me. The true error was the compiler unable to infer to return value:
// Correct Syntax
let resultModels: [ResultModel] = array.enumerated().map { index, model in
// code
}
// Results in the error Closure tuple does not support destructuring
let resultModels = array.enumerated().map { index, model in
// code
}