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

           Summary: Solidary opUnary Postincrement and Postdecrement user
                    defined operators are broken.
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P3
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: sandf...@jhu.edu


--- Comment #0 from Rob Jacques <sandf...@jhu.edu> 2010-05-24 21:45:40 PDT ---
It appears that the operator re-writing for the opUnary Post increment and Post
decrement operators is incorrect for single line expressions.

struct Foo{
    int opUnary(string op)() { return 1; }
}

void main() {
    Foo foo;
    foo++;   // Error: var has no effect in expression (__tmp608)

}

I've marked this as a regression since this was possible (and still is) using
the old operator overloading style.

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

Reply via email to