From page 233 of "Programming in D".
```
import std.stdio;
import std.exception;

void main() {
        MyClass variable;
        use(variable);
}

class MyClass {
        int member;
}

void use(MyClass variable) {
        writeln("variable: ", variable);
        
        try {
                writeln(variable.member); // ← BUG
        } catch (Exception ex) {
                writeln("Exception: ", ex);
        }
}
```

Why does this run, but not display expected null reference exception?
  • Why null referen... Brother Bill via Digitalmars-d-learn

Reply via email to