Summary: std.conv: string->enum doesn't look for longer match
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Shin Fujishiro <> 2010-08-27 23:04:37 PDT 
parse!enum(string) must look for a longer match.

import std.conv;
    enum E { aa, aaZ, aaaZ }
    assert(to!E("aaaZ") == E.aaaZ);
void main() {}
% dmd -unittest -run test
std.conv.ConvError: std.conv(684): Can't convert value `Z' of type
const(char)[] to type E

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to