Bug 9250 – Wrong line number for error involving length of a static array
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-01T08:22:00Z
Last change time
2013-01-05T02:19:05Z
Keywords
diagnostic, pull
Assigned to
andrej.mitrovich
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-01-01T08:22:13Z
struct Foo {
ubyte u;
alias this = u;
}
void main() {
size_t[10] bar; // line 6, error
// ...
// ...
// ...
// ...
Foo x = bar.length;
}
DMD 2.061alpha show a wrong line number for the error message, 6 instead of 11:
test.d(6): Error: cannot implicitly convert expression (10u) of type uint to Foo
Comment #1 by andrej.mitrovich — 2013-01-01T20:38:21Z