Mercurial > projects > dstress
annotate run/f/foreach_38_B.d @ 1586:a74f0139fc3d
Fix tests using typeof on types.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 21 Aug 2008 15:42:21 +0200 |
parents | 22767ec83a24 |
children |
rev | line source |
---|---|
1472
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
2 // $Date$ |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
3 // $Author$ |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
4 |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
5 // @author@ Frits van Bommel <fvbommel@wxs.nl> |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
6 // @date@ 2007-02-06 |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=932 |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
8 // @desc@ [Issue 932] static foreach in second template instantiation uses wrong tupleof |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
9 |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
10 module dstress.run.f.foreach_38_B; |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
11 |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
12 void Fields(C)(){ |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
13 foreach(i, a; typeof(C.tupleof)){ |
1586
a74f0139fc3d
Fix tests using typeof on types.
Christian Kamm <kamm incasoftware de>
parents:
1472
diff
changeset
|
14 static assert(is(a == typeof(C.tupleof)[i])); |
1472
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
15 } |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
16 } |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
17 |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
18 struct MyStruct1 { |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
19 int afield; |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
20 } |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
21 |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
22 struct MyStruct2 { |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
23 real afield; |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
24 } |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
25 |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
26 int main(){ |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
27 Fields!(MyStruct1); |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
28 return 0; |
22767ec83a24
[Issue 932] static foreach in second template instantiation uses wrong tupleof
thomask
parents:
diff
changeset
|
29 } |