for (NSPropertyDescription *property in [[self entity] properties]) {
if ([property isKindOfClass:NSAttributeDescription.class]) {
NSAttributeDescription *attributeDescription = (NSAttributeDescription *)property;
AppCode is giving me the warning Casting to probably incompatible type
on the last line of the code snippet above. Why?
I'm iterating over a list of NSPropertyDescription
objects. NSAttributeDescription
is a subclass of NSPropertyDescription
. I check if the property isKindOfClass
before casting it.
Is this just a bug in AppCode or does it know something I don't and warning me about a danger I'm not familiar with?