Created
April 17, 2012 05:59
-
-
Save unreal/2403806 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Foo.m: | |
- (instancetype) initWithResult:(NSTextCheckingResult *)result forLine:(NSString *)line { | |
if ( self = [super init] ) { | |
// do some stuff | |
} | |
return self; | |
} | |
+ (instancetype) parse:(NSString *)line { | |
// do some stuff | |
return [[self alloc] initWithResult:result forLine:line]; | |
} | |
// Bar.h | |
@interface Bar : Foo | |
// Bar.m | |
- (instancetype) initWithResult:(NSTextCheckingResult *)result forLine:(NSString *)line { | |
if ( self = [super initWithResult:result forLine:line] ) { | |
// do some other stuff | |
} | |
return self; | |
} | |
// BarTest.m | |
- (void)setUp | |
{ | |
[super setUp]; | |
Bar * bar = [Bar parse:line]; // this causes the warning | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment