[Issue 19534] New: Wrong error message "only one index allowed to index int"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 31 21:30:55 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19534
Issue ID: 19534
Summary: Wrong error message "only one index allowed to index
int"
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dkorpel at live.nl
```
auto a = [0, 100, 200][0, 1];
auto b = 200[0];
```
Yields:
Error: only one index allowed to index int[]
Error: only one index allowed to index int
The top error makes sense, but the bottom one does not: you can't index an int
at all, but the error suggests I should use one index (which I already do).
--
More information about the Digitalmars-d-bugs
mailing list