A tupla de fechamento não suporta a desestruturação no Xcode 9 Swift 4
Após o projeto de gloss para Swift 4 no Xcode 9
Estou recebendo o seguinte erro que não faço ideia
Parâmetro de tupla de fechamento '(chave: _, valor: _)' não suporta desestruturação
Código:
extension Dictionary
{
init(elements: [Element]) {
self.init()
for (key, value) in elements {
self[key] = value
}
}
func flatMap<KeyPrime, ValuePrime>(_ transform: (Key, Value) throws -> (KeyPrime, ValuePrime)?) rethrows -> [KeyPrime:ValuePrime] {
return Dictionary<KeyPrime, ValuePrime>(elements: try flatMap({ (key, value) in
return try transform(key, value)
}))
}
}
O erro chega neste momentotry flatMap({ (key, value)in