Bug 6676 – Optimize error std.conv.to!int(const(char[]))

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2011-09-15T05:03:00Z
Last change time
2012-02-23T04:42:45Z
Keywords
wrong-code
Assigned to
nobody
Creator
d_lang

Comments

Comment #0 by d_lang — 2011-09-15T05:03:46Z
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 --------
Comment #1 by yebblies — 2012-02-23T00:55:15Z
I can't reproduce this with 2.058. Anyone?
Comment #2 by bearophile_hugs — 2012-02-23T04:42:45Z
It seems to work now.