http://www.digitalmars.com/d/archives/digitalmars/D/circular_deps_53496.html But according to the specs the compiler is indeed buggy. The specs say: | The order in which ImportDeclarations occur has no significance. //main.d --------------8<--------------- import vec3, mat3, quat; int main() { return 0; } // mat3.d--------------8<--------------- module mat3; import vec3, quat; struct Mat3 { Vec3[3] m; } // quat.d--------------8<--------------- module quat; import vec3, mat3; struct Quat {} // vec3.d--------------8<--------------- module vec3; import mat3, quat; struct Vec3 { } I get this back from the compiler.... unixbox$ dmd main.d vec3.d mat3.d quat.d vec3.d(6): struct vec3.Vec3 no size yet for forward reference vec3.d(6): struct vec3.Vec3 no size yet for forward reference vec3.d(6): struct vec3.Vec3 no size yet for forward reference unixbox$
Created attachment 288 [details] the source code.
Please remember to assign keywords to bug reports. To everybody reading this: Please look through issues you've reported and check for missing keywords. Moreover, what was the point of the attachment when you've already posted the code? What's more, it's so small that by gzipping it you've actually made it bigger than the original files! Anyway, this seems to be closely related to issue 2386....
Although the test case looks a bit different, the patch for #2386 also fixes this issue
Fixed in dmd v1.061 and v2.046.