summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/duplicate-property-class-extension.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/duplicate-property-class-extension.m')
-rw-r--r--test/SemaObjC/duplicate-property-class-extension.m14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/SemaObjC/duplicate-property-class-extension.m b/test/SemaObjC/duplicate-property-class-extension.m
index bdf4786c..a84f83f 100644
--- a/test/SemaObjC/duplicate-property-class-extension.m
+++ b/test/SemaObjC/duplicate-property-class-extension.m
@@ -1,13 +1,21 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
@interface Foo
-@property (readonly) char foo;
+@property (readonly) char foo; // expected-note {{property declared here}}
@end
@interface Foo ()
-@property (readwrite) char foo; // expected-note {{property declared here}}
+@property (readwrite) char foo; // OK
+@property (readwrite) char NewProperty; // expected-note 2 {{property declared here}}
@end
@interface Foo ()
-@property (readwrite) char foo; // expected-error {{property has a previous declaration}}
+@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}}
@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}}
+@end
+
OpenPOWER on IntegriCloud