https://issues.dlang.org/show_bug.cgi?id=2947
Jakob Ovrum <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #7 from Jakob Ovrum <[email protected]> --- (In reply to Georg Wrede from comment #0) > ... Member field initializers are always evaluated at compile-time so this behaviour is not a bug. The bug is that the array elements are allocated in global memory instead of TLS. Only `immutable` and `shared` elements should be allocated in global memory. We can also do it for `const` elements as CTFE should always be pure enough to assume uniqueness. Same issue as CT initializers of mutable class type, i.e. void main() { static Object o = new Object; // stored in global memory; should be TLS } --
