Set the relevent attributes declared in class extension
and fix a missing diagnostics on assigning to a read-only
property. Fixes radar 7766184.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99230 91177308-0d34-0410-b5e6-96231b3b80d8
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}}
+}
+
+