Fariborz Jahanian | 4b6df3f | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
Fariborz Jahanian | 1d5b0e3 | 2007-09-20 17:54:07 +0000 | [diff] [blame] | 3 | @class SUPER, Y; |
| 4 | |
| 5 | @interface INTF :SUPER // expected-error {{cannot find interface declaration for 'SUPER', superclass of 'INTF'}} |
| 6 | @end |
| 7 | |
| 8 | @interface SUPER @end |
| 9 | |
Chris Lattner | b8b96af | 2008-11-23 22:46:27 +0000 | [diff] [blame] | 10 | @interface INTF1 : SUPER // expected-note {{previous definition is here}} |
Fariborz Jahanian | 1d5b0e3 | 2007-09-20 17:54:07 +0000 | [diff] [blame] | 11 | @end |
| 12 | |
| 13 | @interface INTF2 : INTF1 |
| 14 | @end |
| 15 | |
| 16 | @interface INTF3 : Y // expected-error {{cannot find interface declaration for 'Y', superclass of 'INTF3'}} |
| 17 | @end |
| 18 | |
Chris Lattner | b8b96af | 2008-11-23 22:46:27 +0000 | [diff] [blame] | 19 | @interface INTF1 // expected-error {{duplicate interface definition for class 'INTF1'}} |
Fariborz Jahanian | 1d5b0e3 | 2007-09-20 17:54:07 +0000 | [diff] [blame] | 20 | @end |
Steve Naroff | 9511096 | 2008-03-28 21:37:05 +0000 | [diff] [blame] | 21 | |
| 22 | @implementation SUPER |
| 23 | - (void)dealloc { |
| 24 | [super dealloc]; // expected-error {{no super class declared in @interface for 'SUPER'}} |
| 25 | } |
| 26 | @end |