1 /* Ensure that the compiler does not emit spurious extern declarations named '_Foo', where 'Foo'
2 is an ObjC class name. */
3 /* Contributed by Ziemowit Laski <zlaski@apple.com>. */
6 #include <objc/Object.h>
8 #define CHECK_IF(expr) if(!(expr)) abort()
10 @interface _Child: Object
14 @interface Child: _Child
18 @interface Child (Categ)
22 int _Object = 23; /* Should not conflict with @interface Object. */
24 @implementation _Child
25 + (int) flashCache { return 12 + _Object; }
29 + (int) flushCache1 { return 7 + [super flashCache]; }
32 @implementation Child (Categ)
33 + (int) flushCache2 { return 9 + [super flashCache]; }
37 CHECK_IF([_Child flashCache] == 35);
38 CHECK_IF([Child flushCache1] == 42);
39 CHECK_IF([Child flushCache2] == 44);