On this code:
```d
immutable _a = S.c;
struct S {
immutable a = _a;
static immutable c = "bar";
}
```
_a only depends on S.c which is "bar", so this should work, because logically, this is the same as:
```d
immutable _a = _c;
private immutable _c = "bar";
struct S {
immutable a = _a;
static immutable c = _c;
}
```
The problem here seems to be the type inference on `immutable a`, because this code works fine:
```d
immutable _a = S.c;
struct S {
immutable string a = _a;
static immutable c = "bar";
}
```
In the worst case, this should give a more clear message like: "Can't infer type of variable `a`"