The following code crashes on Swift 3, can someone explain why?
struct S { let a:Int } let t = [S(a: 8)] let u:AnyObject = t as NSObject let v:[S] = u as! [S]
Is this because in Swift 3, the array of structures is an NSObject (it is not in Swift 2), and it somehow cannot be converted to an NSArray? And why is it NSObject? ..
source share