(non)nullable types

Christopher Wright dhasenan at gmail.com
Sat Feb 14 17:44:35 PST 2009


Denis Koroskin wrote:
> private void doPart1()
> {
>    void delegate() dg = unchecked(this.dg); // no checking done
>    // use dg here without checking
>    // *BUT* it someone denies the contract and calls the method without
>    // ensuring that this.dg is not null, you'll get a access violation 
> (or NPE)
> }

Fuck no.



More information about the Digitalmars-d mailing list