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

           Summary: invalid reference to "this" in struct
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Szabo Bogdan <[email protected]> 2013-06-14 04:36:57 
PDT ---
struct Test {
    string[] keys;

    Test opAssign(Test rhs){
        assert(this.keys !is null);
        assert(rhs.keys is null);

        keys ~= rhs.keys;

        return this;
    }
}

void main() {
    Test[string] data;
    Test t;

    data["test"] = t;
}


The output:

  core.exception.OutOfMemoryError

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

Reply via email to