https://issues.dlang.org/show_bug.cgi?id=18054
--- Comment #4 from Dlang Bot <[email protected]> --- dlang/dmd pull request #13421 "merge stable" was merged into master: - 75b9a2334042d8b26055b6ad2bc4b7c3605411c5 by Florian: Fix 18054 - Use isBool instead of toInteger when const-folding cast(bool) (#13285) `RealExp` / `ComplexExp` may hold values that don't have a matching integer value (unlike `IntegerExp`). Switching to `toBool` ensures proper boolean conversion according to the current type. The test output shown below (before this change) was caused by the invalid const-folding for floating point literals. ``` float: 1 == 0 double: 1 == 0 real: 1 == 0 ifloat: 1 == 0 idouble: 1 == 0 ireal: 1 == 0 cfloat: 1 == 0 cdouble: 1 == 0 creal: 1 == 0 ``` https://github.com/dlang/dmd/pull/13421 --
