blob: 3b2548b92c116d7ae68875b43a76ae3f3f7efa77 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Steve Naroff5609ec02009-03-08 18:56:13 +00002
3@interface NSObject {}
4
5@end
6
7@interface MyClass : NSObject {}
8
9@end
10
11@interface MyClass (MyCategorie)
12
13@end
14
15@interface MySubClass : MyClass {}
16
17@end
18
19@interface MySubSubClass : MySubClass {}
20
21@end
22
23@implementation NSObject (NSObjectCategory)
24- (void)rootMethod {}
25@end
26
27@implementation MyClass
28
29+ (void)myClassMethod { }
30- (void)myMethod { }
31
32@end
33
34@implementation MyClass (MyCategorie)
35+ (void)myClassCategoryMethod { }
36- (void)categoryMethod {}
37@end
38
39@implementation MySubClass
40
41- (void)mySubMethod {}
42
43- (void)myTest {
44 [self mySubMethod];
45 // should lookup method in superclass implementation if available
46 [self myMethod];
47 [super myMethod];
48
49 [self categoryMethod];
50 [super categoryMethod];
51
52 // instance method of root class
53 [MyClass rootMethod];
54
55 [MyClass myClassMethod];
56 [MySubClass myClassMethod];
57
58 [MyClass myClassCategoryMethod];
59 [MySubClass myClassCategoryMethod];
60}
61
62@end