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'.