http://d.puremagic.com/issues/show_bug.cgi?id=9154
--- Comment #1 from Andrei Alexandrescu <[email protected]> 2012-12-13 19:57:18 PST --- Consider: struct S { int x; void opAssign(ref S s) { } } struct T { S member; } void main() { T t1, t2; t1 = t2; } This fails to compile with the error: Error: cannot modify struct t1 T with immutable members The error is caused by the "ref" in the definition of opAssign. Replacing "ref" with "ref const" or "ref immutable" doesn't help, either. The compiler should act mechanically here: the generated assignment for T should simply perform a field-by-field assignment without nitpicking. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
