xref: /aosp_15_r20/external/clang/test/ASTMerge/Inputs/property2.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// Matching properties
2*67e74705SXin Li@interface I1 {
3*67e74705SXin Li}
4*67e74705SXin Li- (int)getProp2;
5*67e74705SXin Li- (void)setProp2:(int)value;
6*67e74705SXin Li@property (readonly) int Prop1;
7*67e74705SXin Li@property (getter = getProp2, setter = setProp2:) int Prop2;
8*67e74705SXin Li@end
9*67e74705SXin Li
10*67e74705SXin Li// Mismatched property
11*67e74705SXin Li@interface I2
12*67e74705SXin Li@property (readonly) int Prop1;
13*67e74705SXin Li@end
14*67e74705SXin Li
15*67e74705SXin Li// Properties with implementations
16*67e74705SXin Li@interface I3 {
17*67e74705SXin Li  int ivar1;
18*67e74705SXin Li  int ivar2;
19*67e74705SXin Li  int ivar3;
20*67e74705SXin Li  int Prop4;
21*67e74705SXin Li}
22*67e74705SXin Li@property int Prop1;
23*67e74705SXin Li@property int Prop2;
24*67e74705SXin Li@property int Prop3;
25*67e74705SXin Li@property int Prop4;
26*67e74705SXin Li@end
27*67e74705SXin Li
28*67e74705SXin Li@implementation I3
29*67e74705SXin Li@synthesize Prop2 = ivar2;
30*67e74705SXin Li@synthesize Prop1 = ivar1;
31*67e74705SXin Li@synthesize Prop3 = ivar3;
32*67e74705SXin Li@synthesize Prop4 = Prop4;
33*67e74705SXin Li@end
34