The digitalmars.D.learn newsgroup is a more appropriate place for
this, but as for your issue, one thing to keep in mind is that
static constructors are run before main:
import std.stdio;
static this() {
writeln("Foo");
}
void main() {
writeln("main");
}
$ rdmd test.d
Foo
main