constructing module level immutable variables at runtime?
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Mon Feb 22 06:43:06 PST 2016
On 2/22/16 2:36 AM, Danni Coy via Digitalmars-d wrote:
> On Mon, Feb 22, 2016 at 5:29 PM, Sönke Ludwig
> <digitalmars-d at puremagic.com> wrote:
>> I was wrong, there is obviously a language/compiler bug here. It compiles if
>> you remove the "= void", but it does so for "shared static this" as well as
>> for "static this". It really shouldn't in the latter case.
>
> Interesting... It definately seems like should work when explicitly
> asking the variable not the instantiated and not in a thread local
> initialiser.
>
I'm not sure the =void has any effect anyway, it's likely just going to
write the entire static segment with some initial value.
So I'd say remove the =void, and you should be good.
-Steve
More information about the Digitalmars-d
mailing list