Bug 17282 – [REG 2.074.0-b1] std.conv.parse throws with -debug
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-03-29T00:02:45Z
Last change time
2018-01-05T13:28:01Z
Assigned to
No Owner
Creator
Roman
Comments
Comment #0 by freeslave93 — 2017-03-29T00:02:45Z
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.