Mercurial > projects > dstress
comparison run/f/foreach_39_A.d @ 1577:45e89f20882a
[Issue 1400] New: static array in struct as parameter BROKEN
<default_357-line@yahoo.de>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1400
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:20:29 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1576:b3e16c86558e | 1577:45e89f20882a |
---|---|
1 // $HeadURL$ | |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <default_357-line@yahoo.de> | |
6 // @date@ 2007-08-04 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1400 | |
8 // @desc@ [Issue 1400] New: static array in struct as parameter BROKEN | |
9 | |
10 module dstress.run.f.foreach_39_A; | |
11 | |
12 void test(float[3] t) { | |
13 if(5.0f != t[0]){ | |
14 assert(0); | |
15 } | |
16 if(6.0f != t[1]){ | |
17 assert(0); | |
18 } | |
19 if(7.0f != t[2]){ | |
20 assert(0); | |
21 } | |
22 } | |
23 | |
24 struct E { | |
25 float[3] data = [5.0f, 6.0f, 7.0f]; | |
26 } | |
27 | |
28 int main() { | |
29 E[] es; | |
30 E e; | |
31 | |
32 es~=e; | |
33 | |
34 foreach(inout v; es){ | |
35 test(v.data); | |
36 } | |
37 | |
38 return 0; | |
39 } |