Bug 9385 – [Regression 2.057] null literal should be implicitly convertible to bool
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-24T05:27:00Z
Last change time
2013-01-27T22:38:04Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-01-24T05:27:32Z
This code should work.
void main()
{
assert((null ? true : false) == false);
if (null) assert(0);
assert(!null);
}
This regression is introduced from 2.057, by fixing issue 5416.