Commits

Jordan Rose committed ff7b6b74fed
Foundation overlay: Add a generic NSCoder.decodeObjectOfClass(_:forKey:). Like decodeTopLevelObjectOfClass(_:forKey:), this API works very nicely as a generic method in Swift, and this one is actually the one we expect to be commonly used. One thing to note here is that these methods are stricter than their ObjC counterparts: they will do a forced checked cast even when the unarchiver does not use "secure" coding. This depends on the previous commit; without it, we do not actually enforce type safety for these methods. The API notes change is to make the non-generic version of this method unavailable so that it does not participate in overload resolution. Without this we prefer the non-generic method unless there's a contextual type for the result. I've filed rdar://problem/22243198 to track taking this out once Foundation has updated their headers. rdar://problem/17060110 (again) Swift SVN r31154