Open don-reba opened 12 years ago
Multidimensional array index must be without round braces:
def a = array(2, 2);
a[0, 1] = 1;
WriteLine(a[0, 1]);
This is not issue.
Indexing with a tuple is the point. The problem is that it does not work and that the error message inaccurately describes the problem. The real case looks more like this:
def a : array[2, int];
def b : array[int * int];
a[b[i]]; // error
If making multidimensional array indices work with tuples is too much work, it would at least be nice to have the error message fixed.
The error does not make sense. The array index is given what it expects, but then complains about being given something it is not.