Mercurial > projects > dstress
annotate compile/i/inerpret_05_B.d @ 1535:20d8ee6523e1
updated to DMD-1.013
author | thomask |
---|---|
date | Mon, 07 May 2007 05:19:57 +0000 |
parents | 8200aeafb504 |
children |
rev | line source |
---|---|
1434 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Frits van Bommel <fvbommel@wxs.nl> | |
6 // @date@ 2007-03-04 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1021 | |
8 // @desc@ [Issue 1021] CTFE and functions returning void | |
9 | |
10 module dstress.compile.i.interpret_05_B; | |
11 | |
1535 | 12 void bar(ref int x){ |
1434 | 13 x = 2; |
14 } | |
15 | |
16 int foo() { | |
17 int y; | |
18 bar(y); | |
19 return y; | |
20 } | |
21 | |
22 const int z = foo(); | |
23 | |
24 static assert(2 == z); |