Summary: Built-in opAssign implicitly defined should call
                    field's opAssign
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Kenji Hara <> 2011-06-26 10:47:27 PDT ---
Following should compile.
struct X
    int n;
    const void opAssign(const X rhs) {}
struct S
    int n;
    const(X) x;
void main()
    S s;
    s = s;
test.d(14): Error: variable test.main.s cannot modify struct with immutable

S has implicitly defined opAssign, but it does not call field x's opAssign.

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

Reply via email to