How to get to a class initializer through introspection?

Adam D. Ruppe destructionator at
Sun Aug 2 23:59:23 UTC 2020

On Sunday, 2 August 2020 at 22:25:19 UTC, Andrei Alexandrescu 
> Any ideas on how to do that via introspection? The fields are 
> accessible, but not their default values.

It is ugly but possible right now to pull in the symbol via 

See line 20 in my latest blog's example:

ldc complains but it is a type mismatch not a fundamental 
barrier, I just didn't figure out the right thing to silence it 

> It seems like __traits(type, getInitializer) might be necessary.

but yes this would be generally nicer anyway imo.

More information about the Digitalmars-d mailing list