I have the following hierachy class:
@interface Message : NSObject {}
@end
@implementation Message
- (void) dealloc
{
[super dealloc];
}
@end
@interface FooMessage : Message {}
@end
@implementation FooMessage
- (void) dealloc
{
[super dealloc];
}
@end
And the following unit test:
- (void) test
{
FooMessage* msg = [[FooMessage alloc] init];
[msg release];
}
The test will always work with EXC_BAD_INSTRUCTION. FooMessagecalls it a super class destructor in dealloc, but the call never arrives there. Instead, the Objective-C runtime resolves the call elsewhere:

An error does not occur if the base class is Messagerenamed to something else, for example. AbstractMessage. It appears that there is another class with a name Messagewhose definition is not publicly available.
This is mistake? What is really going on here? Am I violating naming restrictions (although I think the compiler should warn me about this)?
This is Xcode 3.1. compilation for iPhone OS 3.0.