www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - foreach bugs

DMD: v0.96 - v0.102
OS : Windows XP

The following crashes the compiler:
===========
void main()
{
   char[] bug = "Crash";
   foreach(char ; bug){}
}

The following produces an "assert error"
===========
void main()
{
   char[] bug = "Assert Error";
   foreach(int idx, char ; bug){};
}

Previously report in v0.96 on Jul 25, 2004:
===========
http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/1100

Andrew Edwards
Sep 21 2004