Douglas Gregor | e326162 | 2010-02-17 18:02:10 +0000 | [diff] [blame] | 1 | // Matching properties |
| 2 | @interface I1 { |
| 3 | } |
| 4 | - (int)getProp2; |
| 5 | - (void)setProp2:(int)value; |
| 6 | @property (readonly) int Prop1; |
| 7 | @property (getter = getProp2, setter = setProp2:) int Prop2; |
| 8 | @end |
| 9 | |
| 10 | // Mismatched property |
| 11 | @interface I2 |
| 12 | @property (readonly) int Prop1; |
| 13 | @end |
Douglas Gregor | 954e0c7 | 2010-12-07 18:32:03 +0000 | [diff] [blame] | 14 | |
| 15 | // Properties with implementations |
| 16 | @interface I3 { |
| 17 | int ivar1; |
| 18 | int ivar2; |
| 19 | int ivar3; |
| 20 | int Prop4; |
| 21 | } |
| 22 | @property int Prop1; |
| 23 | @property int Prop2; |
| 24 | @property int Prop3; |
| 25 | @property int Prop4; |
| 26 | @end |
| 27 | |
| 28 | @implementation I3 |
| 29 | @synthesize Prop2 = ivar2; |
| 30 | @synthesize Prop1 = ivar1; |
| 31 | @synthesize Prop3 = ivar3; |
| 32 | @synthesize Prop4 = Prop4; |
| 33 | @end |