Comment #0 by bearophile_hugs — 2011-11-08T19:23:58Z
D2 code:
import std.stdio;
enum E : int { A, B }
void main() {
writeln(E.B);
}
Nice runtime output, DMD 2.057head:
B
A second D2 program:
import std.stdio;
enum : int { A, B }
void main() {
writeln(B);
}
Runtime output, DMD 2.057head:
1
Is it possible for writeln() to write the handy enum name "B" in this case too?
Comment #1 by bearophile_hugs — 2011-11-15T23:54:16Z
Maybe related to issue 5004
Comment #2 by bearophile_hugs — 2011-11-17T15:48:09Z