mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
Fixed some nested function problems when accessing outer function parameters. Major changes to handling of structs. Initial support for unions. Probably more...
13 lines
143 B
D
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);
|
|
}
|