Run code before dub dependency's `shared static this()`

Eugene Wissner belka at caraus.de
Sun May 5 09:50:49 UTC 2019


On Sunday, 5 May 2019 at 08:24:29 UTC, Vladimirs Nordholm wrote:
> Hello.
>
> I have dub dependency which has a `shared static this()`.
>
> In my project, can I run code code before the dependency's 
> `shared static this()`?


"Static constructors within a module are executed in the lexical 
order in which they appear. All the static constructors for 
modules that are directly or indirectly imported are executed 
before the static constructors for the importer."

Source: https://dlang.org/spec/class.html#static-constructor


More information about the Digitalmars-d-learn mailing list