Shouldn't __traits return Tuples?

Don nospam at nospam.com
Thu Apr 2 00:11:41 PDT 2009


Trass3r wrote:
> I came across another strange bug(?):
> Using const, static const or auto instead of enum makes it work.
> Using the foreach way also works with enum.
> 
> void main()
> {
>     enum members = ["foo", "bar"];
>     for (uint i=0; i<members.length; i++)
> //    foreach (i; Sequence!(members.length))
>     {
>         writefln(members[i]);
>     }
> }
> 
> But enum with for yields:
> 
> object.Error: Access Violation
> std.encoding.EncodingSchemeASCII            à‘B ANSI_X3.4-1968     ’B 
...

Confirmed. Congratulations, you've discovered the Bug of the Year!



More information about the Digitalmars-d mailing list