Comment #0 by bearophile_hugs — 2011-08-16T13:51:20Z
This is almost an enhancement request.
int foo() {
new int[][](1, 1);
return 0;
}
enum _ = foo();
void main() {}
test.d(2): Error: Cannot interpret new int[][](1u,1u) at compile time
test.d(5): Error: cannot evaluate foo() at compile time
While this code works:
int foo() {
int[][] m;
m.length = 1;
m[0].length = 1;
assert(m == [[0]]);
return 0;
}
enum _ = foo();
void main() {}