Shouldn't __traits return Tuples?

Gide Nwawudu gide at btinternet.com
Fri Apr 3 11:48:35 PDT 2009


On Thu, 02 Apr 2009 03:56:35 +0200, Trass3r <mrmocool at gmx.de> 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 
>ANSI_X3.4-1986     (’B ASCII      @’B IBM367     P’B ISO646-US 

Logged as http://d.puremagic.com/issues/show_bug.cgi?id=2792

Gide




More information about the Digitalmars-d mailing list