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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1434
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
1 // $HeadURL$
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
2 // $Date$
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
3 // $Author$
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
4
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
5 // @author@ Frits van Bommel <fvbommel@wxs.nl>
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
6 // @date@ 2007-03-04
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1021
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
8 // @desc@ [Issue 1021] CTFE and functions returning void
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
9
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
10 module dstress.compile.i.interpret_05_B;
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
11
1535
20d8ee6523e1 updated to DMD-1.013
thomask
parents: 1434
diff changeset
12 void bar(ref int x){
1434
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
13 x = 2;
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
14 }
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
15
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
16 int foo() {
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
17 int y;
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
18 bar(y);
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
19 return y;
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
20 }
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
21
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
22 const int z = foo();
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
23
8200aeafb504 r7382@birke: tk | 2007-03-29 15:06:54 +0200
thomask
parents:
diff changeset
24 static assert(2 == z);