I'm afraid this assumption is not true. If the declaration is in a .di file (like in deimos), the module itself is never compiled.

I have tried to fix http://d.puremagic.com/issues/show_bug.cgi?id=10442 by adding semantic3 to the TypeinfoDeclaration types, but I'm not sure yet whether that causes too much bloat: https://github.com/rainers/dmd/commit/b1a8e1be03bba86e2f30fad1775b8706d6be09fe