[Issue 9994] New: Built-in generated opAssign should call dtor on assignment

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 26 01:34:17 PDT 2013


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

           Summary: Built-in generated opAssign should call dtor on
                    assignment
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-04-26 01:34:16 PDT ---
Spin-off from issue 9989.

According to the Walter's comment,
http://d.puremagic.com/issues/show_bug.cgi?id=9989#c2

This code:

extern(C) int printf(const char*, ...);
struct S
{
    ~this(){ printf("dtor\n"); }
}
void main()
{
    S s;
    s = s;
    printf("-- end\n");
}

Should print:
dtor
-- end
dtor

But in current outputs:
-- end
dtor

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


More information about the Digitalmars-d-bugs mailing list