www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3735] New: op=

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3735

           Summary: op=
           Product: D
           Version: 2.038
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: nobody puremagic.com
        ReportedBy: ellery-newcomer utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newcomer utulsa.edu> 2010-01-23
08:46:43 PST ---
Spec says a op= b is semantically equivalent to a = a op b.

Spec lies, or at least is at odds with DMD.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 23 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3735


Stewart Gordon <smjg iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
                URL|                            |http://www.digitalmars.com/
                   |                            |d/1.0/expression.html
                 CC|                            |smjg iname.com
           Platform|Other                       |All
            Version|2.038                       |D1 & D2
         OS/Version|Linux                       |All


--- Comment #1 from Stewart Gordon <smjg iname.com> 2010-09-23 06:16:30 PDT ---
I assume you're talking about the fact that code like this fails:
----------
class Qwert {
    Qwert opAdd(Qwert yuiop) { return this; }
}

void main() {
    Qwert asfdg = new Qwert;
    asdfg += asdfg;
}
----------
I entirely agree that this code should work, on the bases both of common sense
and of this spec.

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