- initWithFoo:(NSObject *)foo { //No warning here if((self = [super init])) { [foo bar]; //Warning here } return self; }
Copyright © Scott Stevenson 2004-2015
by Peter Hosey — Jan 23
Not so. The trick is that it gives the warning on the use of the shadowing local variable, not the declaration of it.
- initWithFoo:(NSObject *)foo { //No warning here if((self = [super init])) { [foo bar]; //Warning here } return self; }