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

           Summary: Error compiling enum with string value in debug
                    (compiles in release)
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: ing...@libertysurf.fr


--- Comment #0 from Rod�ric Vicaire <ing...@libertysurf.fr> 2010-08-17 09:59:37 
PDT ---
The following program 
"
module main;

import std.stdio;

enum TEST_ENUM : string
{
    E_INT = int.stringof,
    E_FLOAT = float.stringof
}

void main( string[] args )
{
    writeln( "Hello World!" );
}
"
produces the following error when compiled in release mode on DMD2.048:
"
Building Debug\DTest.exe...
main.d(7): Error: Integer constant expression expected instead of "int"c
main.d(8): Error: Integer constant expression expected instead of "float"c
main.d(7): Error: Integer constant expression expected instead of "int"c
main.d(8): Error: Integer constant expression expected instead of "float"c
"

however it does compile fine in Release mode.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to