Summary: OpAssign is not called when this(this) is disabled
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from deadalnix <> 2011-11-29 13:16:21 PST ---
As of

If we disable this(this) in a struct, the opAssign member function should be
used if it exists. Here is a sample code :

module fail2;

struct Fail {

    ref Fail opAssign(ref const Fail t) {
        return this;

int main(string[] argv) {
    Fail a;
    Fail b = a; // Error: struct fail2.Fail is not copyable because it is
annotated with @disable

    return 0;

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

Reply via email to