summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/undef-superclass-1.m
blob: 0d670f8c08092b0fab226c646f4ff3658c397e02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// RUN: clang-cc -fsyntax-only -verify %s

@class SUPER, Y;

@interface INTF :SUPER  // expected-error {{cannot find interface declaration for 'SUPER', superclass of 'INTF'}}
@end

@interface SUPER @end

@interface INTF1 : SUPER  // expected-note {{previous definition is here}}
@end

@interface INTF2 : INTF1
@end

@interface INTF3 : Y // expected-error {{cannot find interface declaration for 'Y', superclass of 'INTF3'}}
@end

@interface INTF1  // expected-error {{duplicate interface definition for class 'INTF1'}}
@end

@implementation SUPER
- (void)dealloc {
    [super dealloc]; // expected-error {{no super class declared in @interface for 'SUPER'}}
}
@end
OpenPOWER on IntegriCloud