[Issue 3378] [tdpl] ++x should be an lvalue

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 9 09:09:04 PDT 2009


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



--- Comment #2 from Andrei Alexandrescu <andrei at metalanguage.com> 2009-10-09 09:09:03 PDT ---
(In reply to comment #1)
> (In reply to comment #0)
> > 1. The increment is rewritten as x += 1, but it shouldn't as it's a
> > fundamentally different operation
> 
> From the spec: "
> Overloading ++e and --e
> Since ++e is defined to be semantically equivalent to (e += 1), the expression
> ++e is rewritten as (e += 1), and then checking for operator overloading is
> done. "

I know, I know! That spec must be definitely changed.

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