On Tue, 9 Jun 2015 13:40:27 -0700, Jens Alfke said:
>- (instancetype) init {
> @throw [NSException exceptionWithName: NSInternalInconsistencyException
> reason: @"Flump cannot be initialized
>with -init"
> userInfo: nil];
>}
>
>But this didn’t fix it. The new -init method gets an error “Convenience
>initializer missing a ‘self’ call to another initializer”. The only way
>to get rid of this error is to add a call to -initWithString … but
>there’s no valid parameter I can pass because the caller didn’t provide
>a string. Nor can I put this -init call after the throw, because then
>the compiler complains that it’s unreachable.
>
>It seems as though whoever designed this hadn’t thought through the case
>where a subclass wants to _get rid of_ a superclass’s designated
>initializer, i.e. make it illegal to call it.
I can only say that I see a few dozen of these warnings in my codebase too,
after playing with Xcode 7 today. I concur with your analysis. I also tried:
- (instancetype)init
{
assert(0);
}
Thinking maybe it would clue in on an old school assert, but no.
I guess we have to file Radars and pray. :)
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng [email protected]
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com
This email sent to [email protected]