[Issue 4261] New: Bad textual printing of enums

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 2 14:47:29 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4261

           Summary: Bad textual printing of enums
           Product: D
           Version: unspecified
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-06-02 14:47:27 PDT ---
This D2 program:

import std.stdio: writeln;
void main() {
    enum Foo { Zero, One }
    Foo f = Foo.One;
    writeln(f);
}


With DMD v2.046 prints:
1

But it's better for it to print:
One


See also bug 3308.

-- 
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