43 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s2 3@interface Foo {4@private5 int _foo;6 int _foo2;7}8@property (readwrite, nonatomic) int foo, foo1, foo2, foo3;9@property (readwrite, nonatomic) int PROP;10@end11 12@implementation Foo13 14@synthesize foo = _foo;15@synthesize foo1;16 17- (void)setFoo:(int)value {18 _foo = foo; // expected-error {{use of undeclared identifier 'foo'}}19}20 21- (void)setFoo1:(int)value {22 _foo = foo1; // OK23}24 25- (void)setFoo2:(int)value {26 _foo = foo2; // expected-error {{use of undeclared identifier 'foo2'}}27}28 29- (void)setFoo3:(int)value {30 _foo = foo3; // OK31}32 33@synthesize foo2 = _foo2;34@synthesize foo3;35 36@synthesize PROP=PROP;37- (void)setPROP:(int)value {38 PROP = value; // OK39}40 41@end42 43