Files
ldc/test/foreach7.d
Tomas Lindquist Olsen 9804fe0fa3 [svn r77] Fixed foreach on slice.
Fixed some nested function problems when accessing outer function parameters.
Major changes to handling of structs.
Initial support for unions.
Probably more...
2007-10-31 03:11:32 +01:00

13 lines
143 B
D

module foreach7;
void main()
{
int[4] a = [1,2,3,4];
int i;
foreach(v; a[0..3])
{
i += v;
}
assert(i == 6);
}