D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6315 - Compiling typed named enum with -g switch yields an error.
Summary: Compiling typed named enum with -g switch yields an error.
Status: RESOLVED DUPLICATE of issue 5985
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 05:55 UTC by Kajtek
Modified: 2011-07-16 06:09 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kajtek 2011-07-14 05:55:54 UTC
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 Kenji Hara 2011-07-16 01:58:42 UTC
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 Rainer Schuetze 2011-07-16 06:09:01 UTC
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 ***