• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Anyway to make a generic out of instancetype?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anyway to make a generic out of instancetype?


  • Subject: Re: Anyway to make a generic out of instancetype?
  • From: Rick Mann <email@hidden>
  • Date: Fri, 04 Sep 2015 21:37:35 -0700

> On Sep 4, 2015, at 18:29 , Jens Alfke <email@hidden> wrote:
>
>
>> 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.

Yeah, sorry, mis-typed it. I tried it without (and with) the asterisk. It doesn't recognize it (despite being part of the return type.

--
Rick Mann
email@hidden



_______________________________________________

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


References: 
 >Anyway to make a generic out of instancetype? (From: Rick Mann <email@hidden>)
 >Re: Anyway to make a generic out of instancetype? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Puzzling memory creep
  • Next by Date: Re: Swift generics, circular type declarations, and segfaults, oh my!
  • Previous by thread: Re: Anyway to make a generic out of instancetype?
  • Next by thread: "Computed segue" in iOS?
  • Index(es):
    • Date
    • Thread