I'm guessing this is what you're after: http://codepad.org/TCtG68Fw http://codepad.org/65GBDjPS rdmd main.d shared ctor! ctor! foo.test dtor! shared dtor!