Debian Codegraph @

clang/test/SemaObjC/category-method-lookup-2.m

raw
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
3
4 typedef struct objc_class *Class;
5 @interface NSObject
6 - (Class)class;
7 @end
8 @interface Bar : NSObject
9 @end
10 @interface Bar (Cat)
11 @end
12
13 // NOTE: No class implementation for Bar precedes this category definition.
14 @implementation Bar (Cat)
15
16 // private method.
17 + classMethod { return self; }
18
19 - instanceMethod {
20 [[self class] classMethod];
21 return 0;
22 }
23
24 @end