Mercurial > projects > dstress
annotate run/InExpression_04.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
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 } |