[Issue 5168] String enums don't work with -g compiler switch
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 15 13:28:25 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5168
johannes at jo-t.de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |johannes at jo-t.de
--- Comment #1 from johannes at jo-t.de 2011-11-15 13:27:39 PST ---
still present on 2.056 (running on Win7 x64).
however, problem happens only when enum is named.
for example, the following compiles fine:
enum : string
{
a = "a",
b = "b"
}
int main(string[] argv)
{
writeln(a);
return 0;
}
whereas the following fails:
enum X : string
{
a = "a", // Error: Integer constant expression expected
// instead of "a"
b = "b" // Error: Integer constant expression expected
// instead of "b"
}
int main(string[] argv)
{
writeln(X.a);
return 0;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list