flatMap and `Ambiguous reference to member` error
问题 Consider the following code: typealias PersonRecord = [String : AnyObject] struct Person { let name: String let age: Int public init(name: String, age: Int) { self.name = name self.age = age } } extension Person { init?(record : PersonRecord) { guard let name = record["name"] as? String, let age = record["age"] as? Int else { return nil } self.name = name self.age = age } } Now I want to create an array of Person s from an array of Record s: let records = // load file from bundle let persons