← Back to index
|
Original Bugzilla link
Bug 21610 – Constant folding should not raise errors for dead branches in ternary operator
Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-02-04T12:49:50Z
Last change time
2024-12-13T19:14:27Z
Assigned to
No Owner
Creator
Berni44
Moved to GitHub: dmd#19865 →
Comments
Comment #0
by bugzilla — 2021-02-04T12:49:50Z
enum a = false ? 1 / 0 : 1; does not compile, but produces /home/D/test.d(1): Error: divide by 0
Comment #1
by moonlightsentinel — 2021-02-04T14:27:11Z
The code never reaches CTFE because the error is raised in `constfold.d` during semantic2
Comment #2
by robert.schadek — 2024-12-13T19:14:27Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/19865
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB