Recently I refactored some old code of mine, now utilizing classes instead structs, and I got hit by an uninitialized variable access pattern similar to the simplified example below.

How can we easily spot this? What other switches and safeguards are there?

> dmd -dip1000 -debug -g -w

just crashes with `Error: program killed by signal 11` on linux and nothing 
else.

```d
import std;

@safe:

class Foo { int x; }

void main() {
    Foo f; // = new Foo;
    writeln(f.x);
}
```

Reply via email to