opnsense-src/test/SemaObjC/class-method-self.m

27 lines
325 B
Mathematica
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -verify %s
2009-06-02 13:58:47 -04:00
typedef struct objc_class *Class;
@interface XX
- (void)addObserver:(XX*)o;
@end
@interface YY
+ (void)classMethod;
@end
@implementation YY
static XX *obj;
+ (void)classMethod {
[obj addObserver:self];
Class whatever;
[obj addObserver:whatever]; // GCC warns about this.
}
@end