Bug 6258 – std.conv.to!real("-") fetches the front of an empty array.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2011-07-06T07:43:00Z
Last change time
2011-10-13T23:06:48Z
Keywords
patch
Assigned to
nobody
Creator
kajetan.rzepecki+puremagic
Comments
Comment #0 by kajetan.rzepecki+puremagic — 2011-07-06T07:43:52Z
Instead it should throw ConvException.
Some code and versions:
import std.conv;
void main() {
to!real("-");
//GDC hg, using dmd 2.052 core.exception.AssertError@/.../std/array.d(373): Attempting to fetch the front of an empty array
//DMD32 D Compiler v2.053 core.exception.AssertError@/.../std/array.d(372): Attempting to fetch the front of an empty array
//GNU/Linux i686
}
Comment #1 by kajetan.rzepecki+puremagic — 2011-07-18T10:42:30Z