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.
Comment #1 by k.hara.pg — 2013-01-24T05:46:25Z
Comment #2 by github-bugzilla — 2013-01-25T00:07:56Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/849b6df852843975c2f8238deab6aeea729f9914 fix Issue 9385 - [Regression 2.057] null literal should be implicitly convertible to bool https://github.com/D-Programming-Language/dmd/commit/f1738a00e9ecb09cbfeff8d07971a5485866e6f9 Merge pull request #1545 from 9rnsr/fix9385 Issue 9385 - [Regression 2.057] null literal should be implicitly convertible to bool