This code doesn't work:
void main() {
int[int] a = (int[int]).init;
a[1] = 2;
}
This makes runtime error:
object.Error: Integer Divide by Zero
And this:
void main() {
int[int] a = (int[int]).init;
a[1] = 2;
}
This makes compiletime error:
Error: incompatible types for ((a) == (AssociativeArray(null))): 'int[int]' and 'AssociativeArray!(int,int)'
These bug probably depends on this:
http://d.puremagic.com/issues/show_bug.cgi?id=3962
Comment #1 by zan77137 — 2010-08-25T06:06:48Z
Sorry, I missed.
Correctly for #2:
void main() {
int[int] a;
assert(a == a.init);
}
Error: incompatible types for ((a) == (AssociativeArray(null))): 'int[int]' and
'AssociativeArray!(int,int)'
Comment #2 by code — 2011-08-04T02:18:38Z
*** This issue has been marked as a duplicate of issue 6433 ***