www.digitalmars.com         C & C++   DMDScript  

D - bugs in alpha 4



    enum Color { red, blue, green };
    int[Color.max] colors = [ Color.blue:6, Color.green:2, Color.red:5 ];

    > dmd -I../src/phobos enums.d
    Error: cannot use array to initialize int[Color ]



    enum { red, blue, green };
    int[3] colors = [ blue:6, green:2, red:5 ];


    > dmd -I../src/phobos enums.d
    enums.d(2): Integer constant expression expected instead of blue
Dec 20 2001