[Issue 1174] New: Program hangs creating an array of enums with nonzero initializer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 21 08:16:31 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1174

           Summary: Program hangs creating an array of enums with nonzero
                    initializer
           Product: D
           Version: 1.013
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: deewiant at gmail.com


enum Enum {
        A = 1
}

void main() {
        Enum[] enums = new Enum[1];
}

DMD compiles the above fine, but it seems the call to __d_newarray never
returns. Using the .length method instead of new fails in the same way, but
changing A = 1 to A = 0 (or adding another member with a value of zero prior to
A) makes it work.


-- 



More information about the Digitalmars-d-bugs mailing list