aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjCXX/properties.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjCXX/properties.mm')
-rw-r--r--test/SemaObjCXX/properties.mm39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/SemaObjCXX/properties.mm b/test/SemaObjCXX/properties.mm
index abd4db998bcc..7bb4fab3d3fd 100644
--- a/test/SemaObjCXX/properties.mm
+++ b/test/SemaObjCXX/properties.mm
@@ -164,3 +164,42 @@ namespace test10 {
(void) t.index[t.b];
}
}
+
+// <rdar://problem/14354144>
+@interface PropertyOfItself
+@property (readonly, nonatomic) PropertyOfItself x; // expected-error {{interface type cannot be statically allocated}}
+@end
+@implementation PropertyOfItself
+@synthesize x;
+@end
+
+// rdar://14654207
+struct CGSize {
+ double width;
+ double height;
+};
+typedef struct CGSize CGSize;
+
+struct CGRect {
+ CGSize origin;
+ CGSize size;
+};
+typedef struct CGRect CGRect;
+
+typedef CGRect NSRect;
+void HappySetFrame(NSRect frame) {}
+
+__attribute__((objc_root_class))
+@interface NSObject
+@property CGRect frame;
+@end
+
+@implementation NSObject
+- (void) nothing
+{
+ HappySetFrame({{0,0}, {13,14}});
+ [self setFrame: {{0,0}, {13,14}}];
+ self.frame = {{0,0}, {13,14}};
+ self.frame = (CGRect){{3,5}, {13,14}};
+}
+@end