26 lines · plain
1// RUN: %clang_cc1 -x objective-c -fsyntax-only -verify -Wno-objc-root-class %s2// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s3 4@class UIWindow;5 6@interface CNAppDelegate7 8@property (strong, nonatomic) UIWindow *window;9 10@end11 12 13@interface CNAppDelegate ()14@property (nonatomic,retain) id foo;15@end16 17@implementation CNAppDelegate18@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@end26