blob: a84f83f81fd77ce00d94db9625f2af5b0c580ee7 [file] [log] [blame]
Fariborz Jahanian25760612010-02-15 21:55:26 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3@interface Foo
Fariborz Jahanian80aa1cd2010-06-22 23:20:40 +00004@property (readonly) char foo; // expected-note {{property declared here}}
Fariborz Jahanian25760612010-02-15 21:55:26 +00005@end
6
7@interface Foo ()
Fariborz Jahanian80aa1cd2010-06-22 23:20:40 +00008@property (readwrite) char foo; // OK
9@property (readwrite) char NewProperty; // expected-note 2 {{property declared here}}
Fariborz Jahanian25760612010-02-15 21:55:26 +000010@end
11
12@interface Foo ()
Fariborz Jahanian80aa1cd2010-06-22 23:20:40 +000013@property (readwrite) char foo; // OK again, make primary property readwrite for 2nd time!
14@property (readwrite) char NewProperty; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}}
Fariborz Jahanian25760612010-02-15 21:55:26 +000015@end
Fariborz Jahanian80aa1cd2010-06-22 23:20:40 +000016
17@interface Foo ()
18@property (readonly) char foo; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}}
19@property (readwrite) char NewProperty; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}}
20@end
21