summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/property-in-class-extension.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/property-in-class-extension.m')
-rw-r--r--test/SemaObjC/property-in-class-extension.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaObjC/property-in-class-extension.m b/test/SemaObjC/property-in-class-extension.m
new file mode 100644
index 0000000..3f252d0
--- /dev/null
+++ b/test/SemaObjC/property-in-class-extension.m
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar: // 7766184
+
+@interface Foo @end
+
+@interface Foo ()
+ @property (readonly) int bar;
+@end
+
+void FUNC () {
+ Foo *foo;
+ foo.bar = 0; // expected-error {{assigning to property with 'readonly' attribute not allowed}}
+}
+
+
OpenPOWER on IntegriCloud