blob: b6ac1b7c420dceec2df29f06c7faadd6980cca53 [file] [log] [blame]
Fariborz Jahanian17d0d0d2009-01-08 23:23:10 +00001// RUN: clang -fsyntax-only -Wreadonly-setter-attrs -verify %s
Fariborz Jahanian567c8df2008-12-06 01:12:43 +00002
3@protocol P0
Fariborz Jahanianba45da82008-12-08 19:28:10 +00004@property(readonly,assign) id X; // expected-warning {{property attributes 'readonly' and 'assign' are mutually exclusive}}
Fariborz Jahanian567c8df2008-12-06 01:12:43 +00005@end
6
7@protocol P1
Fariborz Jahanianba45da82008-12-08 19:28:10 +00008@property(readonly,retain) id X; // expected-warning {{property attributes 'readonly' and 'retain' are mutually exclusive}}
Fariborz Jahanian567c8df2008-12-06 01:12:43 +00009@end
10
11@protocol P2
Fariborz Jahanianba45da82008-12-08 19:28:10 +000012@property(readonly,copy) id X; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}}
Fariborz Jahanian567c8df2008-12-06 01:12:43 +000013@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