aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/objc.dg/super-class-2.m
blob: 144ea81b5e68f3870755b2224ddb6104514634a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* Test calling super from within a category class method.  */
/* Author: Ziemowit Laski <zlaski@apple.com>  */
/* { dg-do compile } */

typedef struct objc_object { struct objc_class *isa; } *id;

@interface NSObject
+ (int) test_func0;
@end
@interface NSMenuItem: NSObject
+ (int) test_func0;
@end

@implementation NSObject
+ (int) test_func0
{}
@end

@implementation NSMenuItem
+ (int) test_func0
{
  return [super test_func0];
}
@end

@interface NSObject (Test)
+ (int) test_func;
@end

@implementation NSObject (Test)
+ (int) test_func
{}
@end

@interface NSMenuItem (Test)
+ (int) test_func;
@end

@implementation NSMenuItem (Test)
+ (int) test_func
{
   return [super test_func];  /* { dg-bogus "dereferencing pointer to incomplete type" } */
}
@end