1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 // rdar://7766184 3 4 @interface Foo @end 5 6 @interface Foo () 7 @property (readonly) int bar; 8 @end 9 10 void FUNC () { 11 Foo *foo; 12 foo.bar = 0; // expected-error {{assigning to property with 'readonly' attribute not allowed}} 13 } 14 15 // rdar://8747333 16 @class NSObject; 17 18 @interface rdar8747333 { 19 @private 20 NSObject *_bar; 21 NSObject *_baz; 22 NSObject *_bam; 23 } 24 - (NSObject *)baz; 25 @end 26 27 @interface rdar8747333 () 28 - (NSObject *)bar; 29 @end 30 31 @interface rdar8747333 () 32 @property (readwrite, assign) NSObject *bar; 33 @property (readwrite, assign) NSObject *baz; 34 @property (readwrite, assign) NSObject *bam; 35 @property (readwrite, assign) NSObject *warn; 36 @end 37 38 @interface rdar8747333 () 39 - (NSObject *)bam; 40 - (NSObject *)warn; // expected-note {{method definition for 'warn' not found}} 41 - (void)setWarn : (NSObject *)val; // expected-note {{method definition for 'setWarn:' not found}} 42 @end 43 44 @implementation rdar8747333 // expected-warning {{incomplete implementation}} 45 @synthesize bar = _bar; 46 @synthesize baz = _baz; 47 @synthesize bam = _bam; 48 @dynamic warn; 49 @end 50 51