Steve Naroff | f1afaf6 | 2009-02-26 15:55:06 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
3 | typedef struct objc_class *Class; | ||||
4 | @interface NSObject | ||||
5 | - (Class)class; | ||||
6 | @end | ||||
7 | @interface Bar : NSObject | ||||
8 | @end | ||||
9 | @interface Bar (Cat) | ||||
10 | @end | ||||
11 | |||||
12 | // NOTE: No class implementation for Bar precedes this category definition. | ||||
13 | @implementation Bar (Cat) | ||||
14 | |||||
15 | // private method. | ||||
16 | + classMethod { return self; } | ||||
17 | |||||
18 | - instanceMethod { | ||||
19 | [[self class] classMethod]; | ||||
20 | } | ||||
21 | |||||
22 | @end |