With DMD 2.054 this code compiles and runs, but I think this is not good: struct Foo { int x; } void bar(ref Foo f) { f.x++; } void main() { immutable Foo f; bar(f); }
*** This issue has been marked as a duplicate of issue 5493 ***