Fariborz Jahanian | a8ef2ec | 2008-12-05 18:38:31 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
| 3 | @interface A |
Fariborz Jahanian | 196d0ed | 2008-12-06 21:48:16 +0000 | [diff] [blame] | 4 | -(float) x; // expected-note {{declared at}} |
Fariborz Jahanian | a8ef2ec | 2008-12-05 18:38:31 +0000 | [diff] [blame] | 5 | @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 Jahanian | 0b65b1d | 2008-12-17 17:55:55 +0000 | [diff] [blame] | 20 | |
| 21 | typedef int T[2]; |
| 22 | typedef 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 | |