https://issues.dlang.org/show_bug.cgi?id=12749
Issue ID: 12749 Summary: Constructor-local function allows multiple mutation of immutable member Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nob...@puremagic.com Reporter: acehr...@yahoo.com struct S { immutable int i_; this(int i) { void set(int i) { i_ = i; } set(i); set(i); // effectively second mutation of immutable member } } void main() { auto s = S(1); } Also see the following thread for another example with immutable array: http://forum.dlang.org/thread/tigvenrazuwgvxcae...@forum.dlang.org Ali --