Re: Why is overriding unavailable designated initializer of super required?
Re: Why is overriding unavailable designated initializer of super required?
- Subject: Re: Why is overriding unavailable designated initializer of super required?
- From: Alex Zavatone <email@hidden>
- Date: Mon, 10 Aug 2015 16:32:49 -0400
On Aug 10, 2015, at 4:27 PM, Seth Willits wrote:
>
> I've yet to understand this:
> https://gist.github.com/swillits/3133e114f770947b3cf6
>
>
> If a subclass says that its superclass's designated initializer is unavailable (IOW, the subclass's designated initializer must be used), why does the compiler produce a warning that the superclass's designated initializer must be overridden in the subclass?
>
> If the subclass is going to call super's designated initializer via [super init....] then this subclass override would never get called anyway...
>
> What am I missing?
Is it that it's overridden in the subclass and the subclass then calls the initializer in super? Is it just making sure that the subclass is called first, then that calls the superclass initializer, then when that finishes, the rest of the subclass's initializer code gets called?
Alex Zavatone
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden