[swift-users] Still can't derive from a generic class
Joanna Carter
joanna at carterconsulting.org.uk
Tue Aug 29 12:04:01 CDT 2017
Hi
I would have hoped by now that it should be possible to do :
class BaseObject<rootType : AnyObject>
{
}
class Test : BaseObject<Test>
{
}
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 in C# for many a year. Why oh why can I still not do it in Swift ?
Joanna
--
Joanna Carter
Carter Consulting
More information about the swift-users
mailing list