Re: Anyway to make a generic out of instancetype?
Re: Anyway to make a generic out of instancetype?
- Subject: Re: Anyway to make a generic out of instancetype?
- From: Jens Alfke <email@hidden>
- Date: Fri, 04 Sep 2015 18:29:43 -0700
> On Sep 4, 2015, at 4:47 PM, Rick Mann <email@hidden> wrote:
>
> I have some class methods that return NSArray*. I wanted to have them return NSArray<instancetype*>*, but the compiler doesn't seem to like that. Is it worth trying to do?
Well, it should be <instancetype> instead (the ‘*’ is already included in the type), but in my experience ‘instancetype’ only works as the return type of a method.
—Jens
_______________________________________________
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