On Sunday, 9 February 2020 at 00:15:47 UTC, Drug wrote:
On Saturday, 8 February 2020 at 23:37:56 UTC, realhet wrote:
Hello,
class A{
int i = 42;
}
Is there a way to get that 42? (Input is the class A and the
name of the field 'i')
A.i.init returns 0, so it doesn't care about the class.
classinfo.m_init can be an option, but maybe there's a nicer
way to do this?
Thx!
Try A.init.i
I tried and A.init.stringof == "void()"
That generates a new question, what is void() ?
It has no sizeof property.
I guess it's the voidest of the voids in D :D