Cannot initialize associative array

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sat Jan 20 18:38:40 UTC 2018


On Friday, January 19, 2018 23:39:08 rumbu via Digitalmars-d-learn wrote:
> Thank you Adam, just figured out myself the same solution, but I
> didn't expect to have a static constructor in main.d. I thought
> static constructors are meant to be used in imported modules.
> Thanks again.

There really isn't anything special about whatever module you have main in.
It's just like any other module except that it has main in it. Technically,
you could put main somewhere deep in your module hierarchy. It's just
probably not the best idea from an organizational standpoint.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list