When I added my SwiftyJSON file to my project, it had 45 errors when about 44 of them changed asto as!. Now I am stuck in the latter on line 238 before I go. The error says:
Cannot set value of type "AnyObject" to value of type "AnyObject!"
and the code is as follows:
set {
if self.type == .Array {
var array_: AnyObject = self.object as![AnyObject]
if array_.count > index {
array_[index] = newValue.object
self.object = array_
}
}
}
The error is on line c array_[index] = newValue.object.
Please help me sort this out, thanks in advance.
source
share