Following code causes run-time error.
How can I use static this() without causing error?
It's difficult to avoid this situation because
actual code is more complex.

file main.d:
void main() {
}

file a.d:
import b;
class A {
        static this() {}
};

file b.d:
import a;
class B {
        static this() {}
};

object.Exception@src\rt\minfo.d(162): Aborting: Cycle detected between modules w
ith ctors/dtors:
a -> b -> a


Reply via email to