Mercurial > projects > dstress
diff run/scope_01.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/auto_01.d@6e4063f99377 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/scope_01.d Sun Jul 12 16:44:52 2009 +0200 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Sean Kelly <sean@f4.ca> +// @date@ 2004-09-11 +// @uri@ news:chtj6t$24bm$1@digitaldaemon.com +// @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=1821 + +module dstress.run.scope_01; + +scope class ScopeClass{ + this(){ + throw new Exception("error msg"); + } + ~this(){ + throw new Exception("should never throw"); + } +} + +int main(){ + try{ + scope ScopeClass ac = new ScopeClass(); + }catch{ + return 0; + } + assert(0); +}