On Jan 13, 2017, at 09:46 , Sean McBride <s...@rogue-research.com> wrote: > > NSObject.h declares: > > - (BOOL)isEqual:(id)object; > > Note the parameter is not nullable.
Did I miss a change in clang that made the default “not nullable”?? I read the above declaration as meaning that the nullability is *unspecified*, which implies that nil is allowed. It’s also instructive to read the formal definitions of the attributes: http://clang.llvm.org/docs/AttributeReference.html#null-unspecified <http://clang.llvm.org/docs/AttributeReference.html#null-unspecified> which says that nullability might be unspecified in cases where it cannot properly be determined. Note also that there are different attributes for saying that passing nil is illegal, and passing nil is undefined behavior. As far as I’m aware, it’s always been possible to pass nil as the parameter to “isEqual:”. For that reason, the unannotated method declaration can’t imply a nullability attribute now, other than “unspecified”, because that would break reams of existing code. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com