Given a TypeInfo_Class, instance a new object of its type

Not A Rectangle rahbek at hurtigkode.dk
Mon Oct 26 21:57:18 UTC 2020


Hi everyone,
Say i have a TypeInfo_Class representing a custom type, and i 
want a new instance of this class with its custom type, is there 
a way to do that?

I am aware that TypeInfo_Class has the methods create() and 
factory(), both of which return a new object of the type Object.
I have tried to figure out a way to cast to the custom type using 
cast(...), but it seems i can't get the custom type held in 
TypeInfo in a way cast() will accept.

Is this possible to do?
Thanks


More information about the Digitalmars-d-learn mailing list