Fariborz Jahanian | 2576061 | 2010-02-15 21:55:26 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | @interface Foo |
Fariborz Jahanian | 80aa1cd | 2010-06-22 23:20:40 +0000 | [diff] [blame^] | 4 | @property (readonly) char foo; // expected-note {{property declared here}} |
Fariborz Jahanian | 2576061 | 2010-02-15 21:55:26 +0000 | [diff] [blame] | 5 | @end |
| 6 | |
| 7 | @interface Foo () |
Fariborz Jahanian | 80aa1cd | 2010-06-22 23:20:40 +0000 | [diff] [blame^] | 8 | @property (readwrite) char foo; // OK |
| 9 | @property (readwrite) char NewProperty; // expected-note 2 {{property declared here}} |
Fariborz Jahanian | 2576061 | 2010-02-15 21:55:26 +0000 | [diff] [blame] | 10 | @end |
| 11 | |
| 12 | @interface Foo () |
Fariborz Jahanian | 80aa1cd | 2010-06-22 23:20:40 +0000 | [diff] [blame^] | 13 | @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 Jahanian | 2576061 | 2010-02-15 21:55:26 +0000 | [diff] [blame] | 15 | @end |
Fariborz Jahanian | 80aa1cd | 2010-06-22 23:20:40 +0000 | [diff] [blame^] | 16 | |
| 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 | |