Bug 6315 – Compiling typed named enum with -g switch yields an error.

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-07-14T05:55:00Z
Last change time
2011-07-16T06:09:01Z
Assigned to
nobody
Creator
kajetan.rzepecki+puremagic

Comments

Comment #0 by kajetan.rzepecki+puremagic — 2011-07-14T05:55:54Z
Tested with DMD 2.054 on Win32. Didn't happen in DMD 2.053. enum : string { //OK A = "A", } enum Enum : string { B = "B", //Error: Integer constant expression expected instead of "B". } void main() {}
Comment #1 by k.hara.pg — 2011-07-16T01:58:42Z
This is cv4_Denum function problem in tocvdebug.c. It calls enum member's toInteger(). And, in local, same error occurs with 'dmd-2.053' tag. Maybe this is not 2.054 regression.
Comment #2 by r.sagitario — 2011-07-16T06:09:01Z
There is already a simple patch in report 5985, but maybe a pull request is needed nowadays. *** This issue has been marked as a duplicate of issue 5985 ***