On Tue, Dec 9, 2008 at 9:52 AM, Steven Schveighoffer <[EMAIL PROTECTED]> wrote: > I'm not sure about this problem. I've not encountered it, but it sounds > weird that it would cause a runtime error...
It is weird. ====[a.d]==== module a; import b; static this(){} void main(){} ====[b.d]==== module b; import a; static this(){} ====[Command line]==== $ rebuild a $ ./a object.Exception: Cyclic dependency in module a $ If two modules circularly import each other and they both have static ctors - regardless of whether or not those ctors really are circularly dependent - you get an error at runtime. Why it can't determine this at compile time, I don't know. Why it's an error when there's obviously no cyclic dependency, I don't know. http://d.puremagic.com/issues/show_bug.cgi?id=2457