Objective-C-Runtime Bug When Naming a Superclass “Message”
问题 I have the following class hierachy: @interface Message : NSObject {} @end @implementation Message - (void) dealloc { // I won't be called [super dealloc]; } @end @interface FooMessage : Message {} @end @implementation FooMessage - (void) dealloc { // should call Message - dealloc [super dealloc]; } @end And the following unit test: - (void) test { FooMessage* msg = [[FooMessage alloc] init]; [msg release]; } The test will always fail with EXC_BAD_INSTRUCTION. FooMessage calls it's super