Bug 21699 – Duplicate error for index out of bounds at compile time
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-03-10T18:16:55Z
Last change time
2021-03-14T15:45:48Z
Keywords
pull
Assigned to
No Owner
Creator
RazvanN
Comments
Comment #0 by razvan.nitu1305 — 2021-03-10T18:16:55Z
void main()
{
int[1] a;
a[1] = 9;
}
Output:
onlineapp.d(4): Error: array index 1 is out of bounds a[0 .. 1]
onlineapp.d(4): Error: array index 1 is out of bounds a[0 .. 1]
This is a regression, but I don't know the version since run.dlang.io somehow misses the double message. I have used a more complex version of this code for D Summer School and it used to work correctly.
Comment #1 by dlang-bot — 2021-03-11T09:26:40Z
@RazvanN7 created dlang/dmd pull request #12267 "Fix Issue 21699 - Issue 21699 - Duplicate error for index out of bounds at compile time" fixing this issue:
- Fix Issue 21699 - Issue 21699 - Duplicate error for index out of bounds at compile time
https://github.com/dlang/dmd/pull/12267
Comment #2 by dlang-bot — 2021-03-14T15:45:48Z
dlang/dmd pull request #12267 "Fix Issue 21699 - Duplicate error for index out of bounds at compile time" was merged into master:
- f62e4310378414e6c80bc88c941b0c2bf258fee7 by RazvanN7:
Fix Issue 21699 - Issue 21699 - Duplicate error for index out of bounds at compile time
https://github.com/dlang/dmd/pull/12267