D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4700 - to!float("0") fails
Summary: to!float("0") fails
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Windows
: P2 regression
Assignee: No Owner
URL:
Keywords:
: 4840 (view as issue list)
Depends on:
Blocks:
 
Reported: 2010-08-21 01:32 UTC by Ola Østtveit
Modified: 2010-09-08 02:50 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ola Østtveit 2010-08-21 01:32:34 UTC
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 David Simcha 2010-08-21 18:57:35 UTC
http://dsource.org/projects/phobos/changeset/1914
Comment 2 Nick Sabalausky 2010-09-08 02:50:37 UTC
*** Issue 4840 has been marked as a duplicate of this issue. ***