• 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: Swift -> Obj-C: return __kindof Something
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swift -> Obj-C: return __kindof Something


  • Subject: Re: Swift -> Obj-C: return __kindof Something
  • From: Steve Christensen via Cocoa-dev <email@hidden>
  • Date: Mon, 11 Nov 2019 18:06:46 -0800

Yep, I understand what it does. I’m trying to get the same class-or-subclass
behavior during compilation. I’d looked at the stack overflow article earlier,
so I’ll check out the Swift forum to see what’s there. Thanks.

> On Nov 11, 2019, at 4:43 PM, Quincey Morris
> <email@hidden> wrote:
>
>> On Nov 11, 2019, at 15:07 , Steve Christensen via Cocoa-dev
>> <email@hidden <mailto:email@hidden>> wrote:
>>
>> Some existing Obj-C methods are of the form:
>>
>>      + (nullable __kindof NSManagedObject) someFooThing;
>>
>> Right now I have
>>
>>      class var someFooThing: NSManagedObject?
>
> AFAIK, “__kindof” only affects the ability to assign one Obj-C class pointer
> to a variable of a different but compatible (kind of) type. It doesn’t change
> the actual type of the variable, nor does it (again AFAIK) change the ability
> to assign without errors in Swift. Also see here for some informative
> discussion:
>
>       https://stackoverflow.com/questions/31399208/ios-kindof-nsarray
> <https://stackoverflow.com/questions/31399208/ios-kindof-nsarray>
>
> I suggest you ask about this on forums.swift.org <http://forums.swift.org/>.
> If there’s an alternative, someone there will know.

_______________________________________________

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

  • Follow-Ups:
    • Re: Swift -> Obj-C: return __kindof Something
      • From: Quincey Morris via Cocoa-dev <email@hidden>
    • Re: Swift -> Obj-C: return __kindof Something
      • From: Alex Zavatone via Cocoa-dev <email@hidden>
References: 
 >Swift -> Obj-C: return __kindof Something (From: Steve Christensen via Cocoa-dev <email@hidden>)
 >Re: Swift -> Obj-C: return __kindof Something (From: Quincey Morris via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: Thoughts on Objective-C++
  • Next by Date: Re: Swift -> Obj-C: return __kindof Something
  • Previous by thread: Re: Swift -> Obj-C: return __kindof Something
  • Next by thread: Re: Swift -> Obj-C: return __kindof Something
  • Index(es):
    • Date
    • Thread