Hacker News new | ask | show | jobs
by bryansum 2230 days ago
Looks like that would've probably been caught if it were written in Swift.
1 comments

    if (restrictiveParams[eventName] as! [String: Any])["test"] != nil
In Swift, now hopefully you wouldn't write this code but it's not entirely unlikely too. In fact the above Objective-C snippet is one of the few cases where Objective-C's forgiving `nil` behaviour doesn't save you from a crash.