With these enums...
typedef enum {
ThisThingA = 0,
ThisThingB = 1
} ThisThing;
typedef enum {
ThatThingX = 8,
ThatThingY = 9
} ThatThing;
and these properties...
@property (nonatomic) ThisThing thisThing;
@property (nonatomic) ThatThing thatThing;
I can do this...
self.thisThing = thatThingX;
and I don't get a warning from the compiler, which I would expect. Why is there no warning from the compiler? Why can I assign something that is of type ThatThing to something that is of type ThisThing?
EDIT as per the answer from Martin R: But if I do this...
[self setThisThing:thatThingX];
I get the warning: Implicit conversion from enumeration type 'ThatThing' to different enumeration type 'ThisThing'
(Xcode 4.6.3 and iOS 6.0)