https://issues.dlang.org/show_bug.cgi?id=24454
Nick Treleaven <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from Nick Treleaven <[email protected]> --- > static C static_c = new C(); // line 5 > static const C static_const_c = static_c; fieldrefinit.d(5): Error: variable `fieldrefinit.S.static_c` is a thread-local class and cannot have a static initializer. Use `static this()` to initialize instead. fieldrefinit.d(6): Error: static variable `static_c` cannot be read at compile time It compiles if static_c is made const/immutable, but then c3 is fine. The problem with c2 is issue 10376. I agree that c1 should not be allowed. --
