null references redux + Looney Tunes

bearophile bearophileHUGS at lycos.com
Mon Oct 5 04:28:38 PDT 2009


>     ranged y = 1000; // Uh, bypasses the setter, no errors
>     writeln(y); // 0?

In the last version of DMD it gives an error:

ranged y = 1000;

temp.d(23): Error: cannot implicitly convert expression (1000) of type int to ranged

Better. And opCast may help here. No implicit cast.

Bye,
bearophile



More information about the Digitalmars-d mailing list