https://issues.dlang.org/show_bug.cgi?id=12663
Issue ID: 12663 Summary: Wrong error message for mutation of immutable static array Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Keywords: diagnostic Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: bearophile_h...@eml.cc immutable static int[] data = [1]; static this() { data.length++; } void main() {} DMD 2.066alpha gives an error message that is both wrong in contents and refers to the wrong line: test2.d(1,31): Error: constant 1u is not an lvalue Expected is an error message like: test2.d(3,5): Error: cannot modify immutable expression data --