[Issue 17282] New: std.conv.parse throws with -debug
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Mar 28 17:02:45 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17282
Issue ID: 17282
Summary: std.conv.parse throws with -debug
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: freeslave93 at gmail.com
This code
import std.conv;
void main()
{
import std.stdio;
auto str = "0=\x00\x02\x55\x40&\xff\xf0\n\x00\x04\x55\x40\xff\xf0~4+10\n";
writeln(parse!uint(str));
}
throws "UTFException" when compiled with '-debug', but does not throw
otherwise.
I believe this is not expected behavior. std.conv.parse should not care about
the rest of the content, and just stop after reading the number.
--
More information about the Digitalmars-d-bugs
mailing list