<div dir="ltr">2013/5/11 Henning Pohl <span dir="ltr"><<a href="mailto:henning@still-hidden.de" target="_blank">henning@still-hidden.de</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
a) In the so-called "whole dtor" which calls the dtors of all members including the dtor declared (if any). The attributes of the "whole dtor" are deduced.<br>
<br>
b) Everything takes place in the dtor declared (if any). If the dtor is pure/nothrow/safe, it is guaranteed that the object can be destructed purely/without throwing/safely. This will break existing code.<br>
<br>
-----<br>
struct S { ~this() { } }<br>
struct SX { S s; pure ~this() { } }<br>
-----<br>
<br>
a) Compiles.<br>
b) Error: S.s.~this is impure<br>
<br>
Both behaviors are available on github:<br>
a) <a href="https://github.com/D-Programming-Language/dmd/pull/2006" target="_blank">https://github.com/D-<u></u>Programming-Language/dmd/pull/<u></u>2006</a><br>
b) <a href="https://github.com/D-Programming-Language/dmd/pull/2003" target="_blank">https://github.com/D-<u></u>Programming-Language/dmd/pull/<u></u>2003</a><br>
<br>
You can apply this to postblit, too.<br>
</blockquote></div><br></div><div class="gmail_extra">Until 2.062, dmd has been behaved as a) for destructors, but current git head is accidentally changed to b).</div><div class="gmail_extra" style>I think it is a regression.<br>
</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>Pull#2006 will change back the behavior to a), but pull#2003 doesn't.</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>
Kenji Hara</div></div>