Fixing cyclic import static construction problems

Jacob Carlborg doob at me.com
Wed Nov 28 23:57:31 PST 2012


On 2012-11-29 03:34, Walter Bright wrote:

> Add a pragma,
>
>      pragma(cyclic_imports);
>
> This can appear anywhere in a module, and applies globally to that module.
> It means that static constructors from imports that are not part of the
> cycle
> are run first, and that the static constructor for this module may be
> run before
> the static constructors of other modules that are part of the cycle.

I would think that "cyclic_imports" sounds like the static constructors 
are part of the cycle.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list