[Issue 2881] New: x.stringof returns typeof(x).stringof when x is an enum

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 22 14:26:09 PDT 2009


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

           Summary: x.stringof returns typeof(x).stringof when x is an enum
           Product: D
           Version: 1.041
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: cbkbbejeap at mailinator.com


-------------
enum Shapes
{
        Circle, Square
}

void main()
{
        int i;
        Shapes s;

        pragma(msg, i.stringof);
        pragma(msg, s.stringof);
}
-------------

Expected Output:
i
s

Actual Output:
i
Shapes

I'm not sure, but this might be related to the fix for #1610


-- 



More information about the Digitalmars-d-bugs mailing list