[Issue 7821] New: std.conv.to is broken for enums
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 4 11:28:52 PDT 2012
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: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at 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: -------
More information about the Digitalmars-d-bugs
mailing list