On Friday, March 09, 2012 22:48:25 Timon Gehr wrote: > On 03/09/2012 10:43 PM, Jonathan M Davis wrote: > ... > > >> Jonathan is just speculating. And I think he is wrong. > > > > Speculating about what? > > > > - Jonathan M Davis > > About how assertion failures affect struct destructors, finally > statements and scope statements. If they wouldn't be executed upon > thrown AssertError, then a _passing_ in contract could screw up the > program state. Furthermore, the implementation does execute them.
It's not speculation. There's no guessing involved. It's what I've understood the rules of the language to be. But I asked on dmd-internals to verify it, and Walter has stated that it just so happens that the destructors, scope statements, and finally blocks do currently get run for non-Exception exceptions, but it's not guaranteed: http://forum.dlang.org/post/4f5ae8ec.4040...@digitalmars.com - Jonathan M Davis