Bug 4700 – to!float("0") fails

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2010-08-21T01:32:00Z
Last change time
2010-09-08T02:50:37Z
Assigned to
nobody
Creator
olaa81

Comments

Comment #0 by olaa81 — 2010-08-21T01:32:34Z
import std.conv; auto zero = to!double("0"); fails with core.exception.AssertError@f:\dmd2\windows\bin\..\..\src\phobos\std\array.d(362): Attempting to fetch the front of an empty array It doesn't matter if you convert to float, double or real. Converting ".0" and "0.0" works fine. It works fine on dmd-2.042.
Comment #1 by dsimcha — 2010-08-21T18:57:35Z
Comment #2 by bus_dbugzilla — 2010-09-08T02:50:37Z
*** Issue 4840 has been marked as a duplicate of this issue. ***