Comment #0 by bearophile_hugs — 2011-08-16T13:56:45Z
This is a wrong D2 program:
void main() {
auto foo = new int[][](10, 10);
int i = 2;
foo[i][$ + 1] = 1;
}
It gives at run-time:
core.exception.RangeError@test(4): Range violation
But if possible I'd like a more decriptive message, that gives more information, something like:
core.exception.RangeError@test(4): Range violation (array 'foo[2]', length=10, index=11)
(The disadvantage of this error message is that the binary gets larger in nonrelease mode. If this is too much overhead, then consider a similar message in -debug compilation only).
Comment #1 by andrej.mitrovich — 2014-04-25T18:41:24Z
*** Issue 11841 has been marked as a duplicate of this issue. ***
Comment #2 by andrej.mitrovich — 2014-04-25T18:41:27Z
*** Issue 10696 has been marked as a duplicate of this issue. ***
Comment #3 by robert.schadek — 2024-12-13T17:56:04Z