Home | History | Annotate | Download | only in SemaObjC
      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 // rdar://10593227
      4 
      5 @class UIWindow;
      6 
      7 @interface CNAppDelegate
      8 
      9 @property (strong, nonatomic) UIWindow *window;
     10 
     11 @end
     12 
     13 
     14 @interface CNAppDelegate ()
     15 @property (nonatomic,retain) id foo;
     16 @end
     17 
     18 @implementation CNAppDelegate
     19 @synthesize foo;
     20 @synthesize window = _window;
     21 
     22 +(void)myClassMethod;
     23 {
     24         foo = 0; // expected-error {{instance variable 'foo' accessed in class method}}
     25 }
     26 @end
     27