Comment #0 by bearophile_hugs — 2010-04-02T14:47:06Z
(Not tested with the latest bug fixes, so this can be already fixed)
struct Foo {
int[1] data;
}
int bar() {
Foo f;
f.data = [1];
return 0;
}
enum int _ = bar();
void main() {}
dmd 2.042 gives:
test.d(6): Error: Slice operation f.data[] = [1] cannot be evaluated at compile time
test.d(9): Error: cannot evaluate bar() at compile time
test.d(9): Error: cannot evaluate bar() at compile time