I write one method in swift 1 as follows:
public var array: [JSON]? {
get {
if self.type == .Array {
return map(self.object as! [AnyObject]){ JSON($0) }
} else {
return nil
}
}
}
when I install Xcode 7.2 (swift 2), this method gives me this error:
It is not possible to call "map" using a list of arguments of the type "([AnyObject], (_) → _) '
Now I want to know what this problem is?
source
share