Fatal bug. The following code causes the DMD 2.007 compiler to crash on Windows.
struct A(T)
{
T[] a;
int opApply(int delegate(ref T) dg)
{
foreach(ref v;a)
{
int n = dg(v);
if (n != 0) return n;
}
return 0;
}
};
void main()
{
A!(const(float)) a;
}