Mercurial > projects > dstress
changeset 1117:9393c8f2bc1e
[Issue 303] delegate in finally
Frank Benoit <benoit@tionex.de>
2006-08-21
news:eccer4$2mda$1@digitaldaemon.com
author | thomask |
---|---|
date | Fri, 25 Aug 2006 11:42:39 +0000 |
parents | 5aa513911316 |
children | 6fa59f24470f |
files | run/f/finally_11_A.d |
diffstat | 1 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/f/finally_11_A.d Fri Aug 25 11:42:39 2006 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Frank Benoit <benoit@tionex.de> +// @date@ 2006-08-21 +// @uri@ news:eccer4$2mda$1@digitaldaemon.com +// @desc@ [Issue 303] delegate in finally + +module dstress.run.f.finally_11_A; + +int func2( char[] msg ){ + return msg.length; +} + +int func( char[] delegate() dg ){ + return func2( dg() ); +} + +int main(){ + try{ + }finally{ + if(func("some text") != "some text".length){ + assert(0); + } + } + + return 0; +}