Re: [swift-users] Still can't derive from a generic class

2017-09-01 Thread Joanna Carter via swift-users
Hi Joe Thanks for your input on this. > This is likely due to the runtime not handling cycles properly in type > metadata initialization—a subclass T needs its base class metadata for > BaseObject, which in turn needs the metadata for T to instantiate the > generic type. This is something we p

Re: [swift-users] Still can't derive from a generic class

2017-08-31 Thread Joe Groff via swift-users
> On Aug 30, 2017, at 11:17 AM, Joanna Carter via swift-users > wrote: > > Hi Kenny > >> Just curious, and because I have a distinct lack of imagination: can you >> share a concrete case of this pattern? This is likely due to the runtime not handling cycles properly in type metadata initial

Re: [swift-users] Still can't derive from a generic class

2017-08-30 Thread Joanna Carter via swift-users
Hi Kenny > Just curious, and because I have a distinct lack of imagination: can you > share a concrete case of this pattern? class BaseObject { private let properties: [PartialKeyPath : AnyProperty] init(properties: [PartialKeyPath : AnyProperty]) { self.properties = properties }

Re: [swift-users] Still can't derive from a generic class

2017-08-30 Thread Kenny Leung via swift-users
Just curious, and because I have a distinct lack of imagination: can you share a concrete case of this pattern? Thanks! -Kenny > On Aug 29, 2017, at 10:04 AM, Joanna Carter via swift-users > wrote: > > Hi > > I would have hoped by now that it should be possible to do : > > class BaseObjec

Re: [swift-users] Still can't derive from a generic class

2017-08-30 Thread Kenny Leung via swift-users
Just curious, and because I have a distinct lack of imagination: can you share a concrete case of this pattern? Thanks! -Kenny > On Aug 29, 2017, at 10:04 AM, Joanna Carter via swift-users > wrote: > > Hi > > I would have hoped by now that it should be possible to do : > > class BaseObjec

Re: [swift-users] Still can't derive from a generic class

2017-08-29 Thread Jon Shier via swift-users
Ah, I see. Making a subclass that inherits from a superclass generic to the subclass doesn’t seem like it should be a thing, but I’m not a type theorist. In any case, this is a bug (unexpected runtime crash and all) and you should file it. Jon > On Aug 29, 2017, at 1:25 PM, Joanna Carter

Re: [swift-users] Still can't derive from a generic class

2017-08-29 Thread Joanna Carter via swift-users
Hi Jon > Le 29 août 2017 à 19:20, Jon Shier a écrit : > > This works fine for me in a playground in the latest Xcode 9 beta: > > class Test { } > > class Base { } > > class Sub: Base { } > > let sub = Sub() That may well work but what I want is to be able to do is simpler than that : class

Re: [swift-users] Still can't derive from a generic class

2017-08-29 Thread Jon Shier via swift-users
This works fine for me in a playground in the latest Xcode 9 beta: class Test { } class Base { } class Sub: Base { } let sub = Sub() Jon > On Aug 29, 2017, at 1:04 PM, Joanna Carter via swift-users > wrote: > > Hi > > I would have hoped by now that it should be possible to do : > > cl

[swift-users] Still can't derive from a generic class

2017-08-29 Thread Joanna Carter via swift-users
Hi I would have hoped by now that it should be possible to do : class BaseObject { } class Test : BaseObject { } All compiles well but, at runtime, when calling let test = Test(), I get a "EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)" error. This is something I have been able to do