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