2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / objc.dg / super-class-2.m
blob15d018e7db806e27c342ecd4db33da3453bc8074
1 /* Test calling super from within a category class method.  */
2 /* Author: Ziemowit Laski <zlaski@apple.com>  */
3 /* { dg-do compile } */
4 /* { dg-options "-fnext-runtime" } */
6 typedef struct objc_object { struct objc_class *isa; } *id;
8 @interface NSObject
9 + (int) test_func0;
10 @end
11 @interface NSMenuItem: NSObject
12 + (int) test_func0;
13 @end
15 @implementation NSObject
16 + (int) test_func0
18 @end
20 @implementation NSMenuItem
21 + (int) test_func0
23   return [super test_func0];
25 @end
27 @interface NSObject (Test)
28 + (int) test_func;
29 @end
31 @implementation NSObject (Test)
32 + (int) test_func
34 @end
36 @interface NSMenuItem (Test)
37 + (int) test_func;
38 @end
40 @implementation NSMenuItem (Test)
41 + (int) test_func
43    return [super test_func];  /* { dg-bogus "dereferencing pointer to incomplete type" } */
45 @end