blob: ba233f8c4e61123c5ac06d71fa58be8ff2f37f96 [file] [log] [blame]
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00001// RUN: clang -fsyntax-only -verify %s
2
Fariborz Jahanian1d5b0e32007-09-20 17:54:07 +00003@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 Lattnerb8b96af2008-11-23 22:46:27 +000010@interface INTF1 : SUPER // expected-note {{previous definition is here}}
Fariborz Jahanian1d5b0e32007-09-20 17:54:07 +000011@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 Lattnerb8b96af2008-11-23 22:46:27 +000019@interface INTF1 // expected-error {{duplicate interface definition for class 'INTF1'}}
Fariborz Jahanian1d5b0e32007-09-20 17:54:07 +000020@end
Steve Naroff95110962008-03-28 21:37:05 +000021
22@implementation SUPER
23- (void)dealloc {
24 [super dealloc]; // expected-error {{no super class declared in @interface for 'SUPER'}}
25}
26@end