1// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s
2
3@protocol P0
4@property(readonly,assign) id X;
5@end
6
7@protocol P1
8@property(readonly,retain) id X;
9@end
10
11@protocol P2
12@property(readonly,copy) id X;
13@end
14
15@protocol P3
16@property(readonly,readwrite) id X; // expected-error {{property attributes 'readonly' and 'readwrite' are mutually exclusive}}
17@end
18
19@protocol P4
20@property(assign,copy) id X; // expected-error {{property attributes 'assign' and 'copy' are mutually exclusive}}
21@end
22
23@protocol P5
24@property(assign,retain) id X; // expected-error {{property attributes 'assign' and 'retain' are mutually exclusive}}
25@end
26
27@protocol P6
28@property(copy,retain) id X; // expected-error {{property attributes 'copy' and 'retain' are mutually exclusive}}
29@end
30
31
32// rdar://11656982
33@interface I0 <P0> @end
34@implementation I0
35@synthesize X;
36@end
37
38@interface I1 <P1> @end
39@implementation I1
40@synthesize X;
41@end
42
43@interface I2 <P2> @end
44@implementation I2
45@synthesize X;
46@end
47
48@interface I3 <P3> @end
49@implementation I3
50@synthesize X;
51@end
52
53@interface I4 <P4> @end
54@implementation I4
55@synthesize X;
56@end
57
58@interface I5 <P5> @end
59@implementation I5
60@synthesize X;
61@end
62
63@interface I6 <P6> @end
64@implementation I6
65@synthesize X;
66@end
67
68