November 29, 2007 Re: Fatal bug involving opApply and const in templates | ||||
---|---|---|---|---|
| ||||
On Wed, 28 Nov 2007, Janice Caron wrote: > 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; > } http://d.puremagic.com/issues/ -- please file it after testing with 2.008. Enough with const changed that it's entirely possible the bug doesn't exist any more already. Later, Brad |
Copyright © 1999-2021 by the D Language Foundation