digitalmars.D.bugs - [Issue 19534] New: Wrong error message "only one index allowed to
- d-bugmail puremagic.com (24/24) Dec 31 2018 https://issues.dlang.org/show_bug.cgi?id=19534
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 puremagic.com Reporter: dkorpel 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). --
Dec 31 2018