Comment #3 by bearophile_hugs — 2012-10-28T19:03:08Z
This is crashing dmd, do you want me to open a new bug report?
static struct Foo {
int[] opSlice(int a, int b) {
return [a, b];
}
int opDollar(int dim)() {
return dim;
}
}
void main() {
Foo array;
array[0 .. $];
}
Assertion failure: 'd' on line 1401 in file 'dsymbol.c'
Comment #4 by code — 2012-10-28T20:54:11Z
Because we don't yet have multidimensional slices I forgot to test that combination.
The fix is to by always use dim=0 for slices.