Thread overview
[Issue 6676] New: Optimize error std.conv.to!int(const(char[]))
Sep 15, 2011
Takuya Kurosawa
Feb 23, 2012
yebblies
September 15, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6676

           Summary: Optimize error std.conv.to!int(const(char[]))
           Product: D
           Version: D2
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: d_lang@ku6.jp


--- Comment #0 from Takuya Kurosawa <d_lang@ku6.jp> 2011-09-15 05:03:46 PDT ---
dmd 2.055

Code
--------
import std.conv;

void main()
{
    const(char[]) number = "12345";
    to!int(number);
}
--------


build & run
--------
dmd test.d
./test
dmd -O test.d
./test
std.conv.ConvException@C:\dmd2\windows\bin\..\..\src\phobos\std\conv.d(1640):
Can't convert value `12345' of type const(char)[] to type int
--------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6676


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies@gmail.com


--- Comment #1 from yebblies <yebblies@gmail.com> 2012-02-23 19:55:15 EST ---
I can't reproduce this with 2.058.  Anyone?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6676


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bearophile_hugs@eml.cc
         Resolution|                            |WORKSFORME


--- Comment #2 from bearophile_hugs@eml.cc 2012-02-23 04:42:45 PST ---
It seems to work now.

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