Mercurial > projects > dstress
comparison compile/bug_cgcod_1445_C.d @ 1618:87a6ab8f478d
Returns of non-void expressions are no longer valid in void functions.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 18:48:11 +0100 |
parents | b8c0195059d9 |
children |
comparison
equal
deleted
inserted
replaced
1617:2c10afcfcf76 | 1618:87a6ab8f478d |
---|---|
8 | 8 |
9 module dstress.compile.bug_cgcod_1445_C; | 9 module dstress.compile.bug_cgcod_1445_C; |
10 | 10 |
11 static int[1][5] array = [[1],[2],[3],[4],[5] ]; | 11 static int[1][5] array = [[1],[2],[3],[4],[5] ]; |
12 | 12 |
13 void Lookup(int which){ | 13 int[] Lookup(int which){ |
14 switch(which){ | 14 switch(which){ |
15 case 0: | 15 case 0: |
16 return array[which]; | 16 return array[which]; |
17 } | 17 } |
18 } | 18 } |