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
> 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
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
}
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
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
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
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
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
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