Bug 15695 – Wrong error message in failed conversion from string to int

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-02-17T20:39:00Z
Last change time
2016-12-23T21:17:36Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
hsteoh

Comments

Comment #0 by hsteoh — 2016-02-17T20:39:04Z
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'.
Comment #1 by hsteoh — 2016-02-17T20:49:34Z
Comment #2 by hsteoh — 2016-02-17T20:50:55Z
Comment #3 by github-bugzilla — 2016-02-19T20:59:18Z
Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/b57a61f45f90ed4724939a7f1f9e4eab0d3c3857 Merge pull request #4008 from quickfur/conv_errmsg Issue 15695: wrong error message in failed conversion from string to int
Comment #4 by hsteoh — 2016-02-19T23:56:50Z
Apparently this was a duplicate of https://issues.dlang.org/show_bug.cgi?id=15215