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

           Summary: std.conv.to is broken for enums
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2012-04-04 
11:29:28 PDT ---
import std.conv;

enum Tag
{
     A
    ,AB
}

void main()
{
    Tag tag1 = to!Tag("A");   // ok
    Tag tag2 = to!Tag("AB");  // fail
}

ConvException: Unexpected 'B' when converting from type string to type Tag

It appears if you have an enum field name that begins with another field's name
std.conv.to fails to parse it. This is a blocker for me.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to