Mercurial > projects > dstress
view run/s/scope_21_B.d @ 1619:bebc7472a832
Fix #7.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 18:55:30 +0100 |
parents | 8d5c55d163fd |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Sean Kelly <sean@f4.ca> // @date@ 2006-01-24 // @uri@ news:dr5uqg$2hn7$1@digitaldaemon.com // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=704 module dstress.run.s.scope_21_B; bool hadDtor = false; class MyClass{ this(){ throw new Exception("dummy"); } ~this(){ hadDtor = true; throw new Exception("should never throw"); } } int main(){ try{ scope MyClass c; c = new MyClass(); }catch{ if(!hadDtor){ return 0; }else{ assert(0); } } assert(0); }