On 1/17/2014 7:38 PM, Walter Bright wrote:
But I agree that compile time detect of null reference bugs is better than runtime detection of them.
BTW, the following program:
class C { int a,b; }
int test() {
C c;
return c.b;
}
When compiled with -O:
foo.d(6): Error: null dereference in function _D3foo4testFZi
It isn't much, only working on intra-function analysis and only when the
optimizer is used, but it's something. It's been in dmd for a long time.
