D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5985 - string enum fails with debugging enabled
Summary: string enum fails with debugging enabled
Status: RESOLVED DUPLICATE of issue 5168
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
: 6315 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-05-11 15:14 UTC by Jesse Phillips
Modified: 2011-11-16 09:04 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jesse Phillips 2011-05-11 15:14:48 UTC
Compilation will fail if -g or -gc is used:

break.d(2): Error: Integer constant expression expected instead of "one"
break.d(2): Error: Integer constant expression expected instead of "one"

enum Test : string {
	one = "one"
}
void main() {
}
Comment 1 Rainer Schuetze 2011-05-14 05:22:56 UTC
dmd should not try to output a string enumerator type record, it is marked as incomplete anyway. Here's the patch

https://github.com/rainers/dmd/commit/9d69feb17f075757c9e6874f64b201fa2f40d5b0
Comment 2 Johann MacDonagh 2011-06-15 19:17:49 UTC
This question came up in D.learn the other day. Is the patch ready to be submitted as a pull request to dmd?
Comment 3 Rainer Schuetze 2011-07-16 06:09:03 UTC
*** Issue 6315 has been marked as a duplicate of this issue. ***
Comment 4 Rainer Schuetze 2011-07-17 01:11:03 UTC
https://github.com/D-Programming-Language/dmd/pull/257
Comment 5 Jesse Phillips 2011-11-16 09:04:05 UTC
Looks like there is an older report on this.

*** This issue has been marked as a duplicate of issue 5168 ***