[Issue 9621] New: std.conv.parseEscape fails on octals and named

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 1 02:27:49 PST 2013


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

           Summary: std.conv.parseEscape fails on octals and named
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: monarchdodra at gmail.com


--- Comment #0 from monarchdodra at gmail.com 2013-03-01 02:27:46 PST ---
D allows this:

void main()
{
  string s1 = "\&";
  string s2 = "\141";

  assert(s1 == "&");
  assert(s2 == "a");
}

But parse doesn't allow it (not supported in parse escape).
//----
void main()
{
  string s1 =
  `[
    "\&",
    "\141"
  ]`;
  writeln(parse!(string[])(s1));
}
//----
Can't parse string: Unknown escape character &
Can't parse string: Unknown escape character 1

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