[Issue 15695] New: Wrong error message in failed conversion from string to int

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Feb 17 12:39:04 PST 2016


https://issues.dlang.org/show_bug.cgi?id=15695

          Issue ID: 15695
           Summary: Wrong error message in failed conversion from string
                    to int
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: hsteoh at quickfur.ath.cx

Code:
------
import std.conv;
void main() {
    int i = "@12".to!int;
}
------

Output:
------
Unexpected '1' when converting from type string to type int
------

The error message should be pointing to '@' as the unexpected character, not
'1'.

--


More information about the Digitalmars-d-bugs mailing list