Mercurial > projects > dstress
view run/s/scope_21_B.d @ 1615:8d5c55d163fd
Fix some outdated tests that used auto to mean scope.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 12 Jul 2009 16:44:52 +0200 |
parents | run/a/auto_14_B.d@902d2c168029 |
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); }