Skip to content

Allow non-constant variable initializers #8

Open
@MartinNowak

Description

At module scope variable declarations only have constant initializers.
To support auto seed = unpredictableSeed() the corresponding module should be rewritten like so.

module _mod2;
import _mod0, _mod1;

typeof(unpredictableSeed()) seed;

shared static this()
{
    seed = unpredictableSeed();
}

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions