testsuite, Objective-C : Add initialize method to root class.
Older versions of the runtime don't like it when the root class has a missing initialize method. They try to forward to an non- existent super class resulting in a crash. TODO: maybe we can diagnose this. gcc/testsuite/ChangeLog: * objc.dg/ivar-scope-4.m: Add inititialize method to the root class.
This commit is contained in:
parent
bae828f7bb
commit
40330e7077
1 changed files with 6 additions and 0 deletions
|
@ -18,6 +18,7 @@ int someivar = 1;
|
|||
int someivar;
|
||||
}
|
||||
|
||||
+ (id) initialize;
|
||||
+ (id) alloc;
|
||||
- (id) init;
|
||||
- (int) getGlobal;
|
||||
|
@ -26,6 +27,11 @@ int someivar = 1;
|
|||
@end
|
||||
|
||||
@implementation MyClass
|
||||
+ (id) initialize
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (id) alloc
|
||||
{
|
||||
return class_createInstance (self, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue