annotate run/f/finally_11_A.d @ 1488:1ee9a0dd42d9

changed nntp: URLs to http: URLs
author thomask
date Mon, 09 Apr 2007 12:29:50 +0000
parents 9393c8f2bc1e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1117
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
1 // $HeadURL$
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
2 // $Date$
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
3 // $Author$
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
4
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
5 // @author@ Frank Benoit <benoit@tionex.de>
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
6 // @date@ 2006-08-21
1488
1ee9a0dd42d9 changed nntp: URLs to http: URLs
thomask
parents: 1117
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=8187
1117
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
8 // @desc@ [Issue 303] delegate in finally
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
9
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
10 module dstress.run.f.finally_11_A;
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
11
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
12 int func2( char[] msg ){
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
13 return msg.length;
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
14 }
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
15
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
16 int func( char[] delegate() dg ){
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
17 return func2( dg() );
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
18 }
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
19
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
20 int main(){
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
21 try{
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
22 }finally{
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
23 if(func("some text") != "some text".length){
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
24 assert(0);
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
25 }
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
26 }
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
27
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
28 return 0;
9393c8f2bc1e [Issue 303] delegate in finally
thomask
parents:
diff changeset
29 }