Are the names of some initializer methods like 'initWithRequest' reserved in the API? I have the following classes
@interface MTURLRequest : NSObject {
...
}
...
@end
and
@class MTURLRequest;
@protocol MTURLRequestHandlerDelegate;
@interface MTURLRequestHandler : NSObject {
...
}
-(id)initWithRequest:(MTURLRequest*)request_ delegate:(id<MTURLRequestHandlerDelegate>)delegate_;
@end
@protocol MTURLRequestHandlerDelegate<NSObject>
...
@end
I get a compile warning at the line where I invoke the initializer
-(void)enqueueRequest:(MTURLRequest*)request_ {
...
MTURLRequestHandler *handler = [[MTURLRequestHandler alloc] initWithRequest:request_ delegate:self];
...
}
warning: incompatible Objective-C types 'struct MTURLRequest *', expected 'struct NSURLRequest *' when passing argument 1 of 'initWithRequest:delegate:' from distinct Objective-C type
There is no NSURLRequest in the code. If I rename the initializer to initWithMTURLRequest everything compiles without warnings. Replacing the forward declaration of the class MTURLRequest with an import statement did not change anything. Clean all targets and rebuild as well. And there is surrely no NSURLRequest *request_ in scope.
There is no 'initWithRequest' initializer in NSObject. At least I can not find any. Any clue why this happens?