Bug 13978 – Front-end optimizer bug in OrOrExp

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-13T14:15:00Z
Last change time
2015-02-18T03:42:37Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2015-01-13T14:15:48Z
Boolean-condition || void-expression should be a valid D expression, but the following code fails to compile. ---- bool cond(bool b) { return b; } void main() { cond(true) || assert(0); cond(false) || assert(0); true || assert(0); // Error: integral constant must be scalar type, not void false || assert(0); }
Comment #1 by k.hara.pg — 2015-01-13T14:43:40Z
Comment #2 by github-bugzilla — 2015-01-14T04:40:29Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/61b8de4aa610846fc675dddd3ce92194c77b7102 fix Issue 13978 - Front-end optimizer bug in OrOrExp https://github.com/D-Programming-Language/dmd/commit/c94c5e59b9903cf545869ce76fd13ebb7016f084 Merge pull request #4295 from 9rnsr/fix_optimizer Issue 13977 & 13978 - Fix front-end optimizer bug
Comment #3 by github-bugzilla — 2015-02-18T03:42:37Z