[Issue 4076] Wrong error line number with enum
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 12 02:58:16 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4076
--- Comment #1 from bearophile_hugs at eml.cc 2010-05-12 02:58:08 PDT ---
Another test case:
enum int N = 10; // line 1
void main() {
int[N] arr;
arr[N] = 1; // line 4
}
dmd v2.045 outputs:
test.d(1): Error: array index 10 is out of bounds arr[0 .. 10]
test.d(1): Error: array index 10 is out of bounds arr[0 .. 10]
The line number of the error is wrong, and there is no need to print it two
times. So a better error message can be:
test.d(4): Error: array index 10 is out of bounds arr[0 .. 10]
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list