[Issue 6308] Destruction of temporaries on exception causes segfault

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 15 21:53:43 PDT 2011


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



--- Comment #2 from Vladimir Panteleev <thecybershadow at gmail.com> 2011-07-15 21:48:28 PDT ---
Minimized testcase:

struct C
{
    this(int)
    {
        throw new Exception("Oops!");
    }

    ~this()
    {
    }

    int bar() { return 1; }
}

void foo(int) {}

void main()
{
    foo(C(1).bar());
}

The key finding is that the exception is thrown in the constructor.

-- 
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