1 /* { dg-do compile } */
12 - (void) mySetter: (int)property;
13 - (void) mySetterB: (int)property;
14 - (void) mySetter2: (int)property;
16 /* Test that all the new property attributes can be parsed. */
17 @property (assign) id property_a;
18 @property (copy) id property_b;
19 @property (nonatomic) int property_c;
20 @property (readonly) int property_d;
21 @property (readwrite) int property_e;
22 @property (retain) id property_f;
23 @property (release) int property_g; /* { dg-error "unknown property attribute" } */
25 @property (getter=myGetter) int property_h;
26 @property (setter=mySetter:) int property_i;
28 /* Now test various problems. */
30 @property (readonly, readwrite) int a; /* { dg-error ".readonly. attribute conflicts with .readwrite. attribute" } */
31 @property (readonly, setter=mySetterB:) int b; /* { dg-warning ".readonly. attribute conflicts with .setter. attribute" } */
33 @property (assign, retain) id c; /* { dg-error ".assign. attribute conflicts with .retain. attribute" } */
34 @property (assign, copy) id d; /* { dg-error ".assign. attribute conflicts with .copy. attribute" } */
35 @property (copy, retain) id e; /* { dg-error ".retain. attribute conflicts with .copy. attribute" } */
37 @property (setter=mySetter:,setter=mySetter2:) int f; /* { dg-error ".setter. attribute may only be specified once" } */
38 @property (getter=myGetter, getter=myGetter2 ) int g; /* { dg-error ".getter. attribute may only be specified once" } */