http://d.puremagic.com/issues/show_bug.cgi?id=10643
Summary: Refused const array struct field initialized with void Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2013-07-14 14:35:41 PDT --- class Bar { const int[1000] x = void; this(int n) { x[] = n; } } void main() {} dmd 2.064alpha gives errors but I think the code is correct: test.d(2): Warning: const field with initializer should be static, __gshared, or an enum test.d(4): Error: slice x[] is not mutable There is also some discussion in this thread: http://forum.dlang.org/thread/laxoykycmqqggbfqv...@forum.dlang.org -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------