diff options
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 3 | ||||
-rw-r--r-- | test/SemaObjC/continuation-class-err.m | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 93f8d0dc37..455671596f 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -1911,8 +1911,7 @@ Sema::DeclPtrTy Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, unsigned PIkind = PIDecl->getPropertyAttributes(); if (isReadWrite && (PIkind & ObjCPropertyDecl::OBJC_PR_readonly)) { unsigned assignRetainCopyNonatomic = - (ObjCPropertyDecl::OBJC_PR_assign | - ObjCPropertyDecl::OBJC_PR_retain | + (ObjCPropertyDecl::OBJC_PR_retain | ObjCPropertyDecl::OBJC_PR_copy | ObjCPropertyDecl::OBJC_PR_nonatomic); if ((Attributes & assignRetainCopyNonatomic) != diff --git a/test/SemaObjC/continuation-class-err.m b/test/SemaObjC/continuation-class-err.m index 262b786b54..4559696b7f 100644 --- a/test/SemaObjC/continuation-class-err.m +++ b/test/SemaObjC/continuation-class-err.m @@ -7,11 +7,13 @@ } @property(readonly) id object; // expected-note {{property declared here}} @property(readwrite, assign) id object1; // expected-note {{property declared here}} +@property (readonly) int indentLevel; @end @interface ReadOnly () @property(readwrite, copy) id object; // expected-warning {{property attribute in continuation class does not match the primary class}} @property(readonly) id object1; // expected-error {{property declaration in continuation class of 'ReadOnly' is to change a 'readonly' property to 'readwrite'}} +@property (readwrite, assign) int indentLevel; // OK. assign the the default in any case. @end @protocol Proto |