https://issues.dlang.org/show_bug.cgi?id=15706
Issue ID: 15706
Summary: std.conv.to!int - wrong line number in exception
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Example program (test.d):
-----
import std.conv;
void main () {
auto d = to !(int) ("@");
}
-----
Compiling with dmd 2.070.0 on Windows 32-bit with "dmd -g test.d", I get:
-----
std.conv.ConvException@std\conv.d(2002): Unexpected '@' when converting from
type string to type int
----------------
...
0x00408A80 in main at C:\programs\stuff\dlang\phobos-4008\test.d(7)
...
-----
The actual line number is 3, not 7.
If I compile as "dmd -O -g test.d", the reported line number is 8: wrong again,
but different.
--