Mercurial > projects > dstress
annotate run/InExpression_04.d @ 1619:bebc7472a832
Fix #7.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 18:55:30 +0100 |
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 } |