diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-10 18:01:36 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-10 18:01:36 +0000 |
| commit | a0a9d85a5d14e4e12fe08477f2837c6d276802f0 (patch) | |
| tree | f875044aea0c03f951f29d5d44a4828fc54bdc4b /clang/test/SemaObjC | |
| parent | ca21cd749e17917e55b5cd36305c1a470c7d3dc0 (diff) | |
| download | bcm5719-llvm-a0a9d85a5d14e4e12fe08477f2837c6d276802f0.tar.gz bcm5719-llvm-a0a9d85a5d14e4e12fe08477f2837c6d276802f0.zip | |
Check for duplicate declaration of a property in current and
other class extensions. // rdar://7629420
llvm-svn: 118689
Diffstat (limited to 'clang/test/SemaObjC')
| -rw-r--r-- | clang/test/SemaObjC/duplicate-property-class-extension.m | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/test/SemaObjC/duplicate-property-class-extension.m b/clang/test/SemaObjC/duplicate-property-class-extension.m index e8a2389bbc0..bf48ed61d86 100644 --- a/clang/test/SemaObjC/duplicate-property-class-extension.m +++ b/clang/test/SemaObjC/duplicate-property-class-extension.m @@ -1,23 +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 {{redeclaration 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 {{redeclaration of property in continuation class 'Foo' (attribute must be 'readwrite', while its primary must be 'readonly')}} -@property (readwrite) char NewProperty; // expected-error {{redeclaration 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 |

