www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6258] New: std.conv.to!real("-") fetches the front of an empty array.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6258

           Summary: std.conv.to!real("-") fetches the front of an empty
                    array.
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: kajetan.rzepecki gmail.com



---
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
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 06 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6258




10:42:30 PDT ---
Happens aswell when parsing "in".

to!real("in");

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 18 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6258


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch



https://github.com/D-Programming-Language/phobos/pull/270

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 20 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6258


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



https://github.com/D-Programming-Language/phobos/commit/e51fb3e6da41f7bbfe9005726bb9292f6afb3335

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 13 2011