Daniel Dunbar | 02022f4 | 2009-04-10 21:23:20 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s |
Fariborz Jahanian | 9bc77b2 | 2009-02-27 22:38:11 +0000 | [diff] [blame] | 2 | |
| 3 | @interface INTF |
| 4 | { |
| 5 | id IVAR; |
| 6 | __weak id II; |
| 7 | __weak id WID; |
| 8 | id ID; |
| 9 | __weak INTF* AWEAK; |
| 10 | __weak INTF* WI; |
| 11 | } |
| 12 | @property (assign) __weak id pweak; |
| 13 | @property (assign) __weak id WID; |
| 14 | @property (assign) __strong id not; |
| 15 | @property (assign) id ID; |
| 16 | @property (assign) INTF* AWEAK; |
| 17 | @property (assign) __weak INTF* WI; |
| 18 | @end |
| 19 | |
| 20 | @implementation INTF |
| 21 | @synthesize pweak=IVAR; // expected-error {{existing ivar 'IVAR' for __weak property 'pweak' must be __weak}} |
| 22 | @synthesize not=II; // expected-error {{existing ivar 'II' for a __strong property 'not' must be garbage collectable}} |
| 23 | @synthesize WID; |
| 24 | @synthesize ID; |
| 25 | @synthesize AWEAK; // expected-error {{existing ivar 'AWEAK' for a __strong property 'AWEAK' must be garbage collectable}} |
| 26 | @synthesize WI; |
| 27 | @end |