Confusing "Error: only one index allowed to index [...]"

Dennis dkorpel at gmail.com
Wed Jan 2 22:19:05 UTC 2019


On Wednesday, 2 January 2019 at 20:20:12 UTC, Bastiaan Veelo 
wrote:
> I have been a bit confused by the fact that indexing syntax is 
> opposite for two similar constructs, and that their error 
> messages are very similar but misleading.

I recently stumbled on this confusing error too and made an issue 
for the case of indexing integers:
https://issues.dlang.org/show_bug.cgi?id=19534
It seems like 'only one index allowed' is the compiler's go-to 
error when anything is wrong with indices.


More information about the Digitalmars-d mailing list