blob: 30d56081c5c8b70c7cba2032d40b04c9a7f92c71 [file] [log] [blame]
Fariborz Jahaniana8ef2ec2008-12-05 18:38:31 +00001// RUN: clang -fsyntax-only -verify %s
2
3@interface A
Fariborz Jahanian196d0ed2008-12-06 21:48:16 +00004-(float) x; // expected-note {{declared at}}
Fariborz Jahaniana8ef2ec2008-12-05 18:38:31 +00005@property int x; // expected-error {{type of property 'x' does not match type of accessor 'x'}}
6@end
7
8@interface A (Cat)
9@property int moo; // expected-note {{previous definition is here}}
10@end
11
12@implementation A (Cat)
13-(int) moo {
14 return 0;
15}
16-(void) setMoo: (float) x { // expected-warning {{conflicting types for 'setMoo:'}}
17}
18@end
19
Fariborz Jahanian0b65b1d2008-12-17 17:55:55 +000020
21typedef int T[2];
22typedef void (F)(void);
23
24@interface C
25@property(assign) T p2; // expected-error {{property cannot have array or function type 'T'}}
26
27@property(assign) F f2; // expected-error {{property cannot have array or function type 'F'}}
28
29@end
30
31