diff options
Diffstat (limited to 'test/SemaObjC/duplicate-property-class-extension.m')
-rw-r--r-- | test/SemaObjC/duplicate-property-class-extension.m | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/SemaObjC/duplicate-property-class-extension.m b/test/SemaObjC/duplicate-property-class-extension.m index a84f83f..bf48ed6 100644 --- a/test/SemaObjC/duplicate-property-class-extension.m +++ b/test/SemaObjC/duplicate-property-class-extension.m @@ -1,21 +1,24 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// rdar://7629420 @interface Foo -@property (readonly) char foo; // expected-note {{property declared here}} +@property (readonly) char foo; +@property (readwrite) char bar; // expected-note {{property declared here}} @end @interface Foo () -@property (readwrite) char foo; // OK +@property (readwrite) char foo; // expected-note 2 {{property declared here}} @property (readwrite) char NewProperty; // expected-note 2 {{property declared here}} +@property (readwrite) char bar; // expected-error{{illegal redeclaration of 'readwrite' property in continuation class 'Foo' (perhaps you intended this to be a 'readwrite' redeclaration of a 'readonly' public property?)}} @end @interface Foo () -@property (readwrite) char foo; // OK again, make primary property readwrite for 2nd time! -@property (readwrite) char NewProperty; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}} +@property (readwrite) char foo; // expected-error {{property has a previous declaration}} +@property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}} @end @interface Foo () -@property (readonly) char foo; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}} -@property (readwrite) char NewProperty; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}} +@property (readonly) char foo; // expected-error {{property has a previous declaration}} +@property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}} @end |