[Issue 2282] Struct copy-constructor should call opAssign

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 23 03:00:27 PST 2009


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



--- Comment #4 from Don <clugdbug at yahoo.com.au> 2009-11-23 03:00:24 PST ---
(In reply to comment #3)
> In D2, yes, but what about D1?

The spec is quite clear:

"The assignment operator cannot be overloaded for rvalues that can be
implicitly cast to the lvalue type." (operatoroverloading.html#Assignment).

And when I compile the initial code, I get a compiler error message which is
clear and which is in perfect agreement with the spec:

bug.d(19): Error: function test.Test.opAssign identity assignment operator ove
rload is illegal

-- 
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