| 1 |
/* Contributed by Nicola Pero - Fri Mar 9 19:39:15 CET 2001 */ |
| 2 |
#include <objc/objc.h> |
| 3 |
|
| 4 |
/* Test defining a static function *inside* a class implementation */ |
| 5 |
|
| 6 |
@interface Test |
| 7 |
{ |
| 8 |
Class isa; |
| 9 |
} |
| 10 |
+ (int) test; |
| 11 |
@end |
| 12 |
|
| 13 |
@implementation Test |
| 14 |
|
| 15 |
static int test (void) |
| 16 |
{ |
| 17 |
return 1; |
| 18 |
} |
| 19 |
|
| 20 |
+ (int) test |
| 21 |
{ |
| 22 |
return test (); |
| 23 |
} |
| 24 |
|
| 25 |
+ initialize { return self; } |
| 26 |
@end |
| 27 |
|
| 28 |
int main (void) |
| 29 |
{ |
| 30 |
if ([Test test] != 1) |
| 31 |
{ |
| 32 |
abort (); |
| 33 |
} |
| 34 |
|
| 35 |
return 0; |
| 36 |
} |
| 37 |
|
| 38 |
|