← Back to index
|
Original Bugzilla link
Bug 4670 – Error compiling enum with string value in debug (compiles in release)
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2010-08-17T09:59:00Z
Last change time
2010-10-22T14:02:22Z
Assigned to
nobody
Creator
ingenu
Comments
Comment #0
by ingenu — 2010-08-17T09:59:37Z
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.
Comment #1
by tomeksowi — 2010-10-22T14:02:22Z
*** This issue has been marked as a duplicate of issue 2950 ***