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


Walter Bright <bugzi...@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzi...@digitalmars.com


--- Comment #7 from Walter Bright <bugzi...@digitalmars.com> 2011-04-19 
19:28:48 PDT ---
The patch fails to call the destructor with the following code:

import std.c.stdio;

struct S
{
    int x = 1;

    int bar() { return x; }

    this(int i)
    {
        printf("ctor %p(%d)\n", &this, i);
        t ~= "a";
    }

    this(this)
    {
        printf("postblit %p\n", &this);
        t ~= "b";
    }

    ~this()
    {
        printf("dtor %p\n", &this);
        t ~= "c";
    }

    static string t;
}

S bar() { return S(1); }

void main()
{
    bar().x += 1;
}

I'll see if I can come up with a solution.

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

Reply via email to