Re: Init in Swift
Re: Init in Swift
- Subject: Re: Init in Swift
- From: Quincey Morris <email@hidden>
- Date: Tue, 06 Sep 2016 21:28:23 -0700
- Feedback-id: 167118m:167118agrif8a:167118sNOOIIdVds:SMTPCORP
On Sep 6, 2016, at 21:14 , Gerriet M. Denkmann <email@hidden> wrote:
>
> But I cannot get this to work.
Meaning … ?? A compiler error? What does the source code look like, of the protocol with the class func in it? What is the error message?
> NewSuper uses this classFunction like:
> func otherFunction( arg: UInt64) -> UInt64
> {
> return self.dynamicType.classFunction( arg ) + 21
> }
If this is how you’re using it, it’d be clearer for the method you’re currently calling “classFunction” to be an instance method called something like “utilityFunction”. The only real reason it would *have* to be a class function would be if you’re calling it in a context where there is no instance — and the above is not that.
_______________________________________________
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