Fariborz Jahanian | bd94d44 | 2010-02-19 20:58:54 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi2 -verify %s |
| 2 | |
| 3 | @interface Super @end |
| 4 | |
| 5 | @interface INTFSTANDALONE : Super |
| 6 | { |
| 7 | id IVAR; // expected-note {{previous definition is here}} |
| 8 | } |
| 9 | |
| 10 | @end |
| 11 | |
| 12 | @implementation INTFSTANDALONE : Super // expected-warning {{class implementation may not have super class}} |
| 13 | { |
| 14 | @private |
| 15 | id IVAR1; |
| 16 | @protected |
| 17 | id IVAR2; // expected-error {{only private ivars may be declared in implementation}} |
| 18 | @private |
| 19 | id IVAR3; |
| 20 | int IVAR; // expected-error {{instance variable is already declared}} |
| 21 | } |
| 22 | @end |