https://issues.dlang.org/show_bug.cgi?id=24867

--- Comment #8 from Luís Ferreira <[email protected]> ---
> Sure you can specify the alignment when you define the constant, but this is 
> here to prevent forgetting and then having issues. 

Also, one more point on this: it doesn't matter where you put it if you, in the
end, align it the same way, but the @system issue doesn't trigger on this
situation:

```
struct Bar {
        align(1): 
    const char* name;
    int b = 2;
}

struct Foo {
    static immutable align(1) Bar bar = Bar("foo");

    @safe
    void foo()
    {
        static assert(bar.b == 2);
    }
}
```

--

Reply via email to