diff options
Diffstat (limited to 'test/SemaObjC/property-not-lvalue.m')
-rw-r--r-- | test/SemaObjC/property-not-lvalue.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaObjC/property-not-lvalue.m b/test/SemaObjC/property-not-lvalue.m index f1bda09..473ef86 100644 --- a/test/SemaObjC/property-not-lvalue.m +++ b/test/SemaObjC/property-not-lvalue.m @@ -18,3 +18,17 @@ void foo() { f.size.width = 2.2; // expected-error {{cannot assign to a sub-structure of an ivar using property assignment syntax}} f.size.inner.dim = 200; // expected-error {{cannot assign to a sub-structure of an ivar using property assignment syntax}} } + +// radar 7628953 + +@interface Gorf { +} +- (NSSize)size; +@end + +@implementation Gorf +- (void)MyView_sharedInit { + self.size.width = 2.2; // expected-error {{cannot assign to a sub-structure returned via a getter using property assignment syntax}} +} +- (NSSize)size {} +@end |