]> git.saurik.com Git - apple/objc4.git/blob - test/designatedinit.m
objc4-646.tar.gz
[apple/objc4.git] / test / designatedinit.m
1 // TEST_CONFIG
2 /* TEST_BUILD_OUTPUT
3 .*designatedinit.m:\d+:\d+: warning: designated initializer should only invoke a designated initializer on 'super'.*
4 .*designatedinit.m:\d+:\d+: note: .*
5 .*designatedinit.m:\d+:\d+: warning: designated initializer missing a 'super' call to a designated initializer of the super class.*
6 .*designatedinit.m:\d+:\d+: note: .*
7 .*designatedinit.m:\d+:\d+: warning: method override for the designated initializer of the superclass '-init' not found.*
8 .*NSObject.h:\d+:\d+: note: .*
9 END */
10
11 #include "test.h"
12 #include <objc/NSObject.h>
13
14 @interface C : NSObject
15 -(id) initWithInt:(int)i NS_DESIGNATED_INITIALIZER;
16 @end
17
18 @implementation C
19 -(id) initWithInt:(int)__unused i {
20 return [self init];
21 }
22 @end
23
24 int main()
25 {
26 succeed(__FILE__);
27 }