29 lines · plain
1// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s2 3@interface Subtask4{5 id _delegate;6}7@property(nonatomic,readwrite,assign) id __weak delegate; // expected-error {{unsafe_unretained property 'delegate' may not also be declared __weak}}8@end9 10@implementation Subtask11@synthesize delegate = _delegate;12@end13 14 15@interface PVSelectionOverlayView2 16{17 id __weak _selectionRect; // expected-error {{cannot create __weak reference because the current deployment target does not support weak references}} expected-error {{existing instance variable '_selectionRect' for property 'selectionRect' with assign attribute must be __unsafe_unretained}}18}19 20@property(assign) id selectionRect; // expected-note {{property declared here}}21 22@end23 24@implementation PVSelectionOverlayView225 26@synthesize selectionRect = _selectionRect; // expected-note {{property synthesized here}}27@end28 29