Comment #0 by bearophile_hugs — 2012-04-27T04:54:06Z
This program compiles with no errors:
void main() {
int[0] foos;
foreach (f; foos) {}
}
But the following 3 ones:
int[0] foos;
void main() {
foreach (f; foos) {}
}
void main() {
static int[0] foos;
foreach (f; foos) {}
}
void main() {
__gshared int[0] foos;
foreach (f; foos) {}
}
Crash Optlink with error (DMD 2.060alpha):
OPTLINK (R) for Win32 Release 8.00.12
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
bug3.obj(bug3) Offset 002C3H Record Type 009D
Error 16: Index Range
Comment #1 by clugdbug — 2012-04-29T00:07:44Z
Very similar to bug 5332, probably another symptom of the same bug.
Comment #2 by bugzilla — 2017-10-25T03:35:28Z
*** Issue 16129 has been marked as a duplicate of this issue. ***