What does D define for circular dependencies

Roman D. Boiko rb at d-coding.com
Tue Jun 26 10:34:55 PDT 2012


On Tuesday, 26 June 2012 at 17:27:01 UTC, Mehrdad wrote:
> I realize this scenario might look stupid, but I hope the 
> underlying problem isn't.
>
> Does D define what happens in a situation like this?
>
>
> module a;
> import b;
> static if (!is(typeof(.b.foo))) int foo = 1;
>
>
> module b;
> import a;
> static if (!is(typeof(.a.foo))) int foo = 2;

Yes, TDPL describes similar cases in detail, and I'm sure that D 
specification does, too. Compilation should fail.


More information about the Digitalmars-d mailing list