In 2.108, I started receiving deprecation messages about system variables.
This bizarrely occurs on explicitly typed arrays initialized from unmarked CTFE functions, and not on inferred ones.
```d
int[] arr() { return [1, 2, 3]; }
static immutable x = arr();
static immutable int[] x2 = [1, 2, 3];
static immutable int[] x3 = arr();
void main() @safe {
int v;
v = x[0]; // ok
v = x2[0]; // ok
v = x3[0]; // deprecation
}
```
The deprecation message is:
```
Deprecation: cannot access `@system` variable `x3` in @safe code
```
Marking `arr` as `@safe` fixes the problem.
Using the preview switch indeed treats this as an error, so marking as rejects-valid.
This does not happen for 2.107 and earlier, so this is a regression.
Comment #1 by robert.schadek — 2024-12-13T19:35:35Z