2014-03-15 04:35:00 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wno-incomplete-implementation -verify -fblocks %s
|
2013-12-04 05:11:25 +08:00
|
|
|
|
|
|
|
#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
2015-07-31 03:06:04 +08:00
|
|
|
#define NS_UNAVAILABLE __attribute__((unavailable))
|
2013-12-04 05:11:25 +08:00
|
|
|
|
2019-02-14 04:32:37 +08:00
|
|
|
void fnfoo(void) NS_DESIGNATED_INITIALIZER; // expected-error {{'objc_designated_initializer' attribute only applies to Objective-C methods}}
|
2013-12-04 05:11:25 +08:00
|
|
|
|
|
|
|
@protocol P1
|
2014-03-15 02:19:46 +08:00
|
|
|
-(id)init NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}}
|
2013-12-04 05:11:25 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface I1
|
2014-03-15 02:19:46 +08:00
|
|
|
-(void)meth NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}}
|
2013-12-04 05:11:25 +08:00
|
|
|
-(id)init NS_DESIGNATED_INITIALIZER;
|
2014-03-15 02:19:46 +08:00
|
|
|
+(id)init NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}}
|
2013-12-04 05:11:25 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I1(cat)
|
2014-03-15 02:19:46 +08:00
|
|
|
-(id)init2 NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}}
|
2013-12-04 05:11:25 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I1()
|
2014-03-15 02:19:46 +08:00
|
|
|
-(id)init3 NS_DESIGNATED_INITIALIZER;
|
2013-12-04 05:11:25 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I1
|
|
|
|
-(void)meth {}
|
2014-03-15 02:19:46 +08:00
|
|
|
-(id)init NS_DESIGNATED_INITIALIZER { return 0; } // expected-error {{only applies to init methods of interface or class extension declarations}}
|
2013-12-04 05:11:25 +08:00
|
|
|
+(id)init { return 0; }
|
2014-03-29 06:45:38 +08:00
|
|
|
-(id)init3 { return 0; }
|
2014-03-15 02:19:46 +08:00
|
|
|
-(id)init4 NS_DESIGNATED_INITIALIZER { return 0; } // expected-error {{only applies to init methods of interface or class extension declarations}} \
|
2014-05-07 07:24:16 +08:00
|
|
|
// expected-warning {{convenience initializer missing a 'self' call to another initializer}}
|
2013-12-04 05:11:25 +08:00
|
|
|
@end
|
2013-12-04 05:11:36 +08:00
|
|
|
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface B1
|
2013-12-14 10:16:41 +08:00
|
|
|
-(id)initB1 NS_DESIGNATED_INITIALIZER; // expected-note 6 {{method marked as designated initializer of the class here}}
|
2013-12-04 05:11:36 +08:00
|
|
|
-(id)initB2;
|
|
|
|
@end
|
|
|
|
|
2014-03-29 06:45:38 +08:00
|
|
|
@interface B1()
|
2015-03-12 00:59:48 +08:00
|
|
|
-(id)initB3 NS_DESIGNATED_INITIALIZER; // expected-note 4 {{method marked as designated initializer of the class here}}
|
2014-03-29 06:45:38 +08:00
|
|
|
@end;
|
|
|
|
|
2013-12-04 05:11:36 +08:00
|
|
|
@implementation B1
|
|
|
|
-(id)initB1 { return 0; }
|
2014-05-07 07:24:16 +08:00
|
|
|
-(id)initB2 { return 0; } // expected-warning {{convenience initializer missing a 'self' call to another initializer}}
|
2013-12-04 05:11:36 +08:00
|
|
|
-(id)initB3 { return 0; }
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S1 : B1
|
|
|
|
-(id)initS1 NS_DESIGNATED_INITIALIZER; // expected-note {{method marked as designated initializer of the class here}}
|
|
|
|
-(id)initS2 NS_DESIGNATED_INITIALIZER;
|
2013-12-04 05:11:43 +08:00
|
|
|
-(id)initS3 NS_DESIGNATED_INITIALIZER; // expected-note 2 {{method marked as designated initializer of the class here}}
|
2013-12-04 05:11:36 +08:00
|
|
|
-(id)initB1;
|
|
|
|
@end
|
|
|
|
|
2014-03-29 06:45:38 +08:00
|
|
|
@interface S1()
|
|
|
|
-(id)initS4 NS_DESIGNATED_INITIALIZER; // expected-note 2 {{method marked as designated initializer of the class here}}
|
|
|
|
@end
|
|
|
|
|
2013-12-04 05:11:36 +08:00
|
|
|
@implementation S1
|
|
|
|
-(id)initS1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-(id)initS2 {
|
|
|
|
return [super initB1];
|
|
|
|
}
|
|
|
|
-(id)initS3 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
2013-12-04 05:11:43 +08:00
|
|
|
return [super initB2]; // expected-warning {{designated initializer invoked a non-designated initializer}}
|
2013-12-04 05:11:36 +08:00
|
|
|
}
|
|
|
|
-(id)initS4 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
2013-12-04 05:11:43 +08:00
|
|
|
return [self initB1]; // expected-warning {{designated initializer should only invoke a designated initializer on 'super'}}
|
2013-12-04 05:11:36 +08:00
|
|
|
}
|
|
|
|
-(id)initB1 {
|
|
|
|
return [self initS1];
|
|
|
|
}
|
|
|
|
-(id)initB3 {
|
|
|
|
return [self initS1];
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S2 : B1
|
|
|
|
-(id)initB1;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface SS2 : S2
|
|
|
|
-(id)initSS1 NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
|
2013-12-04 05:11:54 +08:00
|
|
|
@implementation SS2 // expected-warning {{method override for the designated initializer of the superclass '-initB1' not found}} \
|
|
|
|
// expected-warning {{method override for the designated initializer of the superclass '-initB3' not found}}
|
2013-12-04 05:11:36 +08:00
|
|
|
-(id)initSS1 {
|
|
|
|
return [super initB1];
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S3 : B1
|
2013-12-04 05:11:54 +08:00
|
|
|
-(id)initS1 NS_DESIGNATED_INITIALIZER; // expected-note {{method marked as designated initializer of the class here}}
|
2013-12-04 05:11:36 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface SS3 : S3
|
2013-12-04 05:11:43 +08:00
|
|
|
-(id)initSS1 NS_DESIGNATED_INITIALIZER; // expected-note 2 {{method marked as designated initializer of the class here}}
|
2013-12-04 05:11:36 +08:00
|
|
|
@end
|
|
|
|
|
2013-12-04 05:11:54 +08:00
|
|
|
@implementation SS3 // expected-warning {{method override for the designated initializer of the superclass '-initS1' not found}}
|
2013-12-04 05:11:36 +08:00
|
|
|
-(id)initSS1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
2013-12-04 05:11:43 +08:00
|
|
|
return [super initB1]; // expected-warning {{designated initializer invoked a non-designated initializer}}
|
2013-12-04 05:11:36 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S4 : B1
|
|
|
|
-(id)initB1;
|
|
|
|
-(id)initB3;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation S4
|
|
|
|
-(id)initB1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-(id)initB3 {
|
|
|
|
return [super initB3];
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S5 : B1
|
2013-12-04 05:11:43 +08:00
|
|
|
-(void)meth;
|
2013-12-04 05:11:36 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation S5
|
|
|
|
-(id)initB1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-(id)initB3 {
|
2013-12-04 05:11:43 +08:00
|
|
|
[self initB1]; // expected-warning {{designated initializer should only invoke a designated initializer on 'super'}}
|
|
|
|
S5 *s;
|
|
|
|
[s initB1];
|
|
|
|
[self meth];
|
|
|
|
void (^blk)(void) = ^{
|
2014-03-18 05:41:40 +08:00
|
|
|
[self initB1]; // expected-warning {{designated initializer should only invoke a designated initializer on 'super'}}
|
2013-12-04 05:11:43 +08:00
|
|
|
};
|
2013-12-04 05:11:36 +08:00
|
|
|
return [super initB3];
|
|
|
|
}
|
2013-12-04 05:11:43 +08:00
|
|
|
-(void)meth {}
|
2013-12-04 05:11:49 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S6 : B1
|
|
|
|
-(id)initS1 NS_DESIGNATED_INITIALIZER;
|
|
|
|
-(id)initS2;
|
|
|
|
-(id)initS3;
|
|
|
|
-(id)initS4;
|
|
|
|
@end
|
|
|
|
|
2013-12-04 05:11:54 +08:00
|
|
|
@implementation S6 // expected-warning {{method override for the designated initializer of the superclass '-initB1' not found}} \
|
|
|
|
// expected-warning {{method override for the designated initializer of the superclass '-initB3' not found}}
|
2013-12-04 05:11:49 +08:00
|
|
|
-(id)initS1 {
|
|
|
|
return [super initB1];
|
|
|
|
}
|
2014-05-07 07:24:16 +08:00
|
|
|
-(id)initS2 { // expected-warning {{convenience initializer missing a 'self' call to another initializer}}
|
|
|
|
return [super initB1]; // expected-warning {{convenience initializer should not invoke an initializer on 'super'}}
|
2013-12-04 05:11:49 +08:00
|
|
|
}
|
|
|
|
-(id)initS3 {
|
|
|
|
return [self initB1];
|
|
|
|
}
|
|
|
|
-(id)initS4 {
|
|
|
|
return [self initS1];
|
|
|
|
}
|
|
|
|
-(id)initS5 {
|
2014-05-07 07:24:16 +08:00
|
|
|
[super initB1]; // expected-warning {{convenience initializer should not invoke an initializer on 'super'}}
|
2013-12-04 05:11:49 +08:00
|
|
|
void (^blk)(void) = ^{
|
2014-05-07 07:24:16 +08:00
|
|
|
[super initB1]; // expected-warning {{convenience initializer should not invoke an initializer on 'super'}}
|
2013-12-04 05:11:49 +08:00
|
|
|
};
|
|
|
|
return [self initS1];
|
|
|
|
}
|
2014-05-07 07:24:16 +08:00
|
|
|
-(id)initS6 { // expected-warning {{convenience initializer missing a 'self' call to another initializer}}
|
2013-12-04 05:11:49 +08:00
|
|
|
S6 *s;
|
|
|
|
return [s initS1];
|
|
|
|
}
|
2013-12-04 05:11:36 +08:00
|
|
|
@end
|
2013-12-05 15:07:03 +08:00
|
|
|
|
|
|
|
@interface SS4 : S4
|
|
|
|
-(id)initB1;
|
|
|
|
@end
|
|
|
|
|
2015-03-12 00:59:48 +08:00
|
|
|
@implementation SS4
|
2013-12-05 15:07:03 +08:00
|
|
|
-(id)initB1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S7 : B1
|
|
|
|
-(id)initB1;
|
|
|
|
-(id)initB3;
|
|
|
|
-(id)initNewOne;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface SS7 : S7
|
|
|
|
-(id)initB1;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation SS7
|
|
|
|
-(id)initB1 {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
@end
|
2013-12-13 11:48:17 +08:00
|
|
|
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface B2
|
|
|
|
-(id)init;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S8: B2
|
|
|
|
-(id)initS8 NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation S8
|
|
|
|
-(id)initS8
|
|
|
|
{
|
|
|
|
return [super init];
|
|
|
|
}
|
|
|
|
@end
|
2013-12-14 10:16:41 +08:00
|
|
|
|
|
|
|
@interface S9 : B1
|
|
|
|
-(id)initB1;
|
|
|
|
-(id)initB3;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S9(secondInit)
|
|
|
|
-(id)initNewOne;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface SS9 : S9
|
|
|
|
-(id)initB1;
|
|
|
|
@end
|
|
|
|
|
2015-03-12 00:59:48 +08:00
|
|
|
@implementation SS9
|
2013-12-14 10:16:41 +08:00
|
|
|
-(id)initB1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
@end
|
2014-03-12 02:56:18 +08:00
|
|
|
|
|
|
|
// rdar://16261494
|
|
|
|
@class GEOPDAnalyticMetadata; // expected-note {{forward declaration of class here}}
|
|
|
|
|
|
|
|
@implementation GEOPDAnalyticMetadata (PlaceCardExtras) // expected-error {{cannot find interface declaration for 'GEOPDAnalyticMetadata'}}
|
|
|
|
- (instancetype)initInProcess
|
|
|
|
{
|
|
|
|
return ((void*)0);
|
|
|
|
}
|
|
|
|
@end
|
2014-03-15 04:35:00 +08:00
|
|
|
|
|
|
|
// rdar://16305460
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface MyObject
|
|
|
|
- (instancetype)initWithStuff:(id)stuff __attribute__((objc_designated_initializer));
|
2015-07-31 03:06:04 +08:00
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
2014-03-15 04:35:00 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MyObject
|
|
|
|
- (instancetype)init
|
|
|
|
{
|
|
|
|
return ((void*)0);
|
|
|
|
}
|
|
|
|
@end
|
2014-03-18 05:41:40 +08:00
|
|
|
|
|
|
|
// rdar://16323233
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface B4
|
2014-04-17 02:32:42 +08:00
|
|
|
-(id)initB4 NS_DESIGNATED_INITIALIZER; // expected-note 4 {{method marked as designated initializer of the class here}}
|
|
|
|
-(id)initNonDI;
|
2014-03-18 05:41:40 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface rdar16323233 : B4
|
|
|
|
-(id)initS4 NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation rdar16323233
|
|
|
|
-(id)initS4 {
|
|
|
|
static id sSharedObject = (void*)0;
|
|
|
|
(void)^(void) {
|
|
|
|
sSharedObject = [super initB4];
|
|
|
|
};
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-(id)initB4 {
|
|
|
|
return [self initS4];
|
|
|
|
}
|
|
|
|
@end
|
2014-04-17 02:32:42 +08:00
|
|
|
|
|
|
|
@interface S1B4 : B4
|
|
|
|
@end
|
|
|
|
@implementation S1B4
|
|
|
|
-(id)initB4 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
|
|
|
return [super initNonDI]; // expected-warning {{designated initializer invoked a non-designated initializer}}
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S2B4 : B4
|
|
|
|
-(id)initB4;
|
|
|
|
@end
|
|
|
|
@implementation S2B4
|
|
|
|
-(id)initB4 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
|
|
|
return [super initNonDI]; // expected-warning {{designated initializer invoked a non-designated initializer}}
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S3B4 : B4
|
|
|
|
@end
|
|
|
|
@implementation S3B4
|
|
|
|
-(id)initNew {
|
|
|
|
return [super initB4];
|
|
|
|
}
|
|
|
|
-(id)initB4 {
|
|
|
|
return [self initNew];
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S4B4 : B4
|
|
|
|
-(id)initNew;
|
|
|
|
@end
|
|
|
|
@implementation S4B4
|
|
|
|
-(id)initNew {
|
|
|
|
return [super initB4];
|
|
|
|
}
|
|
|
|
-(id)initB4 {
|
|
|
|
return [self initNew];
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S5B4 : B4
|
|
|
|
-(id)initB4;
|
|
|
|
@end
|
|
|
|
@implementation S5B4
|
|
|
|
-(id)initNew {
|
|
|
|
return [super initB4];
|
|
|
|
}
|
|
|
|
-(id)initB4 {
|
|
|
|
return [self initNew];
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface S6B4 : B4
|
|
|
|
-(id)initNew;
|
|
|
|
-(id)initB4;
|
|
|
|
@end
|
|
|
|
@implementation S6B4
|
|
|
|
-(id)initNew {
|
|
|
|
return [super initB4];
|
|
|
|
}
|
|
|
|
-(id)initB4 {
|
|
|
|
return [self initNew];
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface NSObject
|
2014-04-17 02:32:51 +08:00
|
|
|
-(instancetype) init NS_DESIGNATED_INITIALIZER; // expected-note {{method marked as designated initializer of the class here}}
|
2014-04-17 02:32:42 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Test3 : NSObject
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Test3
|
|
|
|
-(instancetype) initWithBasePath:(id)path {
|
|
|
|
return [super init];
|
|
|
|
}
|
|
|
|
-(instancetype) init {
|
|
|
|
return [self initWithBasePath:0];
|
|
|
|
}
|
|
|
|
@end
|
2014-04-17 02:32:51 +08:00
|
|
|
|
|
|
|
@interface Test1 : NSObject
|
|
|
|
-(instancetype) init NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
@implementation Test1
|
|
|
|
-(instancetype) init {
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2015-07-31 03:06:04 +08:00
|
|
|
@interface SubTest1 : Test1
|
|
|
|
-(instancetype)init NS_UNAVAILABLE;
|
|
|
|
-(instancetype)initWithRequiredParameter:(id)foo NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
@implementation SubTest1
|
|
|
|
-(instancetype)initWithRequiredParameter:(id)foo {
|
|
|
|
return [super init];
|
|
|
|
}
|
|
|
|
@end
|
2014-04-17 02:32:51 +08:00
|
|
|
|
2019-03-01 14:43:20 +08:00
|
|
|
@interface SubTest1Ext : Test1
|
|
|
|
-(instancetype)initWithRequiredParameter:(id)foo NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
// Mark 'init' as unavailable in the extension to silence warning.
|
|
|
|
@interface SubTest1Ext()
|
|
|
|
-(instancetype)init NS_UNAVAILABLE;
|
|
|
|
@end
|
|
|
|
@implementation SubTest1Ext
|
|
|
|
-(instancetype)initWithRequiredParameter:(id)foo {
|
|
|
|
return [super init];
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2014-04-17 02:32:51 +08:00
|
|
|
@interface Test2 : NSObject
|
|
|
|
@end
|
|
|
|
@interface SubTest2 : Test2
|
|
|
|
@end
|
|
|
|
@implementation SubTest2
|
|
|
|
-(instancetype) init { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
@end
|
2014-04-27 05:28:41 +08:00
|
|
|
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface RootNoDI
|
|
|
|
-(id)init;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Base : RootNoDI
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Base
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Derived : Base
|
|
|
|
- (instancetype)initWithInt:(int)n NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Derived
|
|
|
|
- (instancetype)initWithInt:(int)n
|
|
|
|
{
|
|
|
|
return [super init];
|
|
|
|
}
|
|
|
|
@end
|
2015-01-21 04:41:36 +08:00
|
|
|
|
|
|
|
@interface ExtensionForMissingInterface() // expected-error{{cannot find interface declaration}}
|
|
|
|
- (instancetype)init NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface CategoryForMissingInterface(Cat) // expected-error{{cannot find interface declaration}}
|
|
|
|
- (instancetype)init NS_DESIGNATED_INITIALIZER; // expected-error{{only applies to init methods of interface or class extension declarations}}
|
|
|
|
@end
|
2019-02-14 04:32:37 +08:00
|
|
|
|
|
|
|
@interface TwoAttrs
|
|
|
|
-(instancetype)foo
|
|
|
|
__attribute__((objc_designated_initializer))
|
|
|
|
__attribute__((objc_method_family(init)));
|
|
|
|
-(instancetype)bar
|
|
|
|
__attribute__((objc_method_family(init)))
|
|
|
|
__attribute__((objc_designated_initializer));
|
|
|
|
-(instancetype)baz
|
|
|
|
__attribute__((objc_designated_initializer, objc_method_family(init)));
|
|
|
|
-(instancetype)quux
|
|
|
|
__attribute__((objc_method_family(init), objc_designated_initializer));
|
|
|
|
@end
|