int doubleAndSumInt(int4 v)
{
int sum = 0;
foreach (ref e; v)
sum += (e *= 2);
return sum;
}
Comment #1 by uplink.coder — 2019-01-30T00:11:56Z
Ah yes.
I know about this one ;)
I don't think it's important ... throw a -vcg-ast at it and you will see why it fails.
Comment #2 by bugzilla — 2020-12-28T09:37:05Z
Replacing the v in the foreach with v.array will enable it to work. It's not documented to work without the .array, so I'm setting this as an enhancement request.