[Issue 9154] Incorrectly generated assignment operator

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 13 21:02:08 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9154



--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2012-12-13 21:02:05 PST ---
(In reply to comment #1)
> The compiler should act mechanically here: the generated assignment for T
> should simply perform a field-by-field assignment without nitpicking.

OK. When I organized "identity assignable" concept, I had lacked it in my fix
(mainly dmd pull #166).

- Even if user defines an opAssign which receives only lvalue, compiler should
treat it as identity opAssign.

This is satisfied the condition for field-by-field assignment.

Then, S is treated as an "identity assignable" struct, and built-in opAssign
generating in T will succeed correctly.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list