www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1794] New: Array enums are broken, causing access violation

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1794

           Summary: Array enums are broken, causing access violation
           Product: D
           Version: 2.009
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: torhu yahoo.com


Bug is still present in 2.010.

---
import std.stdio;

enum int[] array = [1, 2, 3];

void main()
{
   writefln(array); // works fine

   foreach (x; array)  // access violation
      writefln(x);
}
---


-- 
Jan 20 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1794


torhu yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from torhu yahoo.com  2008-03-10 03:59 -------
Fixed dmd 2.012.


-- 
Mar 10 2008