[Issue 16491] Forward referencing and static/shared static module constructors break initialisation

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Nov 18 03:02:13 PST 2016


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

--- Comment #4 from Ethan Watson <gooberman at gmail.com> ---
Of course it can be solved by assigning this specific string at compile time.
Because you remove the shared static constructor.

Replace the contents of the constructor with a writeln and delete the gshared
storage. Done. The point is the static constructor and the invalid cyclic
dependency between pointers.

No, seriously. That's two people now to have commented on the most irrelevant
part of the bug. The title of this bug explains exactly what's wrong.

--


More information about the Digitalmars-d-bugs mailing list