Summary: Inconsistent behaviour of ++/-- when mixing opUnary
                    and 'alias this'.
           Product: D
           Version: unspecified
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-04-17 05:13:08 PDT ---
In the following example, ++x calls opUnary while x++ is performed on x

struct X
    int x;
    alias x this;

    typeof(this) opUnary (string operator) ()
        writeln ("operator called");
        return this;
    X x;
    ++x; //operator called
    auto y = x++; //BUG! (alias this used. returns int)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to