Cyclic Dependencies
torhu
no at spam.invalid
Tue Dec 9 02:11:14 PST 2008
Ellery Newcomer wrote:
> When I first started learning D I decided that a good way to learn it
> would be by porting a popular java api (mind, I didn't say intelligent),
> which came complete with a few cyclic dependencies. At the moment, I'm
> using GDC, and it refuses to swallow cyclic dependencies. The compiler
> doesn't complain, but it throws a runtime exception. I can break the
> dependency loops and GDC will work just fine, but what I'm wondering is
> whether it is standard that the dependency hierarchy be acyclic, or is
> this some quirk of GDC, or is it more likely that there is something
> weird going on in my java-to-D translation.
>
You can't use module constructors (static this) in modules that import
each other.
More information about the Digitalmars-d-learn
mailing list