annotate run/f/foreach_39_B.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1577
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
1 // $HeadURL$
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
2 // $Date$
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
3 // $Author$
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
4
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
5 // @author@ <default_357-line@yahoo.de>
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
6 // @date@ 2007-08-04
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1400
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
8 // @desc@ [Issue 1400] New: static array in struct as parameter BROKEN
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
9
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
10 module dstress.run.f.foreach_39_B;
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
11
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
12 void test(float[3] t) {
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
13 if(5.0f != t[0]){
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
14 assert(0);
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
15 }
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
16 if(6.0f != t[1]){
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
17 assert(0);
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
18 }
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
19 if(7.0f != t[2]){
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
20 assert(0);
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
21 }
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
22 }
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
23
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
24 struct E {
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
25 float[3] data = [5.0f, 6.0f, 7.0f];
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
26 }
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
27
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
28 int main() {
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
29 E[] es;
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
30 E e;
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
31
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
32 es~=e;
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
33
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
34 foreach(v; es){
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
35 test(v.data);
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
36 }
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
37
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
38 return 0;
45e89f20882a [Issue 1400] New: static array in struct as parameter BROKEN
thomask
parents:
diff changeset
39 }