1 // RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s
5 int IVAR; // expected-note{{ivar is declared here}}
9 @property id prop_id; // expected-warning {{no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed}}, expected-warning {{default property attribute 'assign' not appropriate for non-gc object}}
14 @property int d1; // expected-warning {{property 'd1' requires method 'd1' to be defined }} \
15 // expected-warning {{property 'd1' requires method 'setD1:' to be defined }}
19 @synthesize d1; // expected-error {{synthesized property 'd1' must either be named the same as}}
20 @dynamic bad; // expected-error {{property implementation must have its declaration in interface 'I'}}
21 @synthesize prop_id; // expected-error {{synthesized property 'prop_id' must either be named the same}} // expected-note {{previous declaration is here}}
22 @synthesize prop_id = IVAR; // expected-error {{type of property 'prop_id' ('id') does not match type of ivar 'IVAR' ('int')}} // expected-error {{property 'prop_id' is already implemented}}
23 @synthesize name; // OK! property with same name as an accessible ivar of same name
26 @implementation I(CAT) // expected-note 2 {{implementation is here}}
27 @synthesize d1; // expected-error {{@synthesize not allowed in a category's implementation}}
28 @dynamic bad; // expected-error {{property implementation must have its declaration in the category 'CAT'}}
31 @implementation E // expected-warning {{cannot find interface declaration for 'E'}}
32 @dynamic d; // expected-error {{property implementation must have its declaration in interface 'E'}}
35 @implementation Q(MYCAT) // expected-error {{cannot find interface declaration for 'Q'}}
36 @dynamic d; // expected-error {{property implementation in a category with no category declaration}}
45 double bar = [foo bar];
50 typedef id BYObjectIdentifier;
54 @property(copy) BYObjectIdentifier identifier;
61 @property int treeController; // expected-note {{property declared here}}
62 @property int ivar; // OK
63 @property int treeController; // expected-error {{property has a previous declaration}}