```
import std.stdio;

@safe:

__gshared int gshared = 42;

void foo(int i = gshared)
{
    writeln(i);
}

void main()
{
    foo();
}
```

This currently works; `foo` is `@safe` and prints the value of `gshared`. Changing the call in main to `foo(gshared)` errors.

Should it work, and can I expect it to keep working?

Reply via email to