Hi,
This program, compiled with dmd 1.065 under Linux, crashes:
void main() {
Num a = 1;
}
struct Num {
int[] d;
Num opAssign( int v ) {
d.length = 1;
d[0] = v;
return *this;
}
}
It looks like d is not initialized before opAssign() is called.
It doesn't crash if I replace "Num a = 1" with:
Num a;
a = 1;
Is this normal behaviour?