• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1  -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -verify -Wno-objc-root-class %s
2// rdar://8899430
3
4@interface WeakPropertyTest {
5    Class isa;
6    __weak id value;
7    id x; // expected-error {{existing instance variable 'x' for __weak property 'x' must be __weak}}
8}
9@property (weak) id value1;
10@property __weak id value;
11@property () __weak id value2;
12
13@property (weak, assign) id v1;  // expected-error {{property attributes 'assign' and 'weak' are mutually exclusive}}
14@property (weak, copy) id v2; // expected-error {{property attributes 'copy' and 'weak' are mutually exclusive}}
15@property (weak, retain) id v3; // expected-error {{property attributes 'retain' and 'weak' are mutually exclusive}}
16@property (weak, assign) id v4;  // expected-error {{property attributes 'assign' and 'weak' are mutually exclusive}}
17
18@property () __weak id x; // expected-note {{property declared here}}
19@end
20
21@implementation WeakPropertyTest
22@synthesize x; // expected-note {{property synthesized here}}
23@dynamic value1, value, value2, v1,v2,v3,v4;
24@end
25