Conditional ? bug

Anders F Björklund afb at
Fri Oct 6 05:14:16 PDT 2006

Max Samuha wrote:

>>So you have to use "test != null ? : 0" for that kind of 
>>thing.  Just "test ? : 0" works too.
> Sorry, my fault. I should have used !is or simply test. Thanks

Not entirelly your fault, "== null" and "!= null" is common
enough to have the D compiler detect them at compile time...

Or it could just be defined to "false", like it is in Java.
(i.e. "For any non-null reference x, x == null equals false")


More information about the Digitalmars-d-bugs mailing list