Mercurial > projects > dstress
annotate run/InExpression_04.d @ 1576:b3e16c86558e
[Issue 1398] New: GDC doesn't generate correct code
<mariusmuja@gmail.com>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1398
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:20:08 +0000 |
parents | da000f026b76 |
children |
rev | line source |
---|---|
180 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.InExpression_04; | |
6 | |
7 struct MyStruct{ | |
8 int i; | |
9 char c; | |
10 } | |
11 | |
12 int main(){ | |
13 MyStruct value; | |
14 value.i = 1; | |
15 value.c = '1'; | |
16 char[] key = "eins"; | |
17 MyStruct[char[]] array; | |
18 | |
19 array[key]=value; | |
20 MyStruct* ptr = key in array; | |
21 | |
22 assert(value == *ptr); | |
23 | |
24 return 0; | |
25 } |