| 1 |
// RUN: %clang_cc1 -x objective-c -fsyntax-only -verify -Wno-objc-root-class %s |
| 2 |
// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s |
| 3 |
|
| 4 |
@class UIWindow; |
| 5 |
|
| 6 |
@interface CNAppDelegate |
| 7 |
|
| 8 |
@property (strong, nonatomic) UIWindow *window; |
| 9 |
|
| 10 |
@end |
| 11 |
|
| 12 |
|
| 13 |
@interface CNAppDelegate () |
| 14 |
@property (nonatomic,retain) id foo; |
| 15 |
@end |
| 16 |
|
| 17 |
@implementation CNAppDelegate |
| 18 |
@synthesize foo; |
| 19 |
@synthesize window = _window; |
| 20 |
|
| 21 |
+(void)myClassMethod; |
| 22 |
{ |
| 23 |
foo = 0; // expected-error {{instance variable 'foo' accessed in class method}} |
| 24 |
} |
| 25 |
@end |