[Issue 9881] Indirect cyclic imports are not forbidden

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon May 12 14:37:45 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=9881

Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #3 from Martin Nowak <code at dawg.eu> ---
I don't see a feasible way to resolve this problem by restricting or ordering
the dependencies. Consider the following example which has the same underlying
problem.

cat > a.d << CODE
__gshared Object o;
CODE
cat > b.d << CODE
import a;
shared static this() { assert(o !is null); }
CODE
cat > c.d << CODE
import a;
shared static this() { o = new Object; }
CODE

dmd -main -unittest b c -run a

dmd -main -unittest c b -run a

--


More information about the Digitalmars-d-bugs mailing list