https://issues.dlang.org/show_bug.cgi?id=14835

Walter Bright <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #8 from Walter Bright <[email protected]> ---
It seems the problem lies here:

https://github.com/dlang/dmd/blob/master/src/statement.d#L453

                if (s.condition.isBool(true))
                {
                    if (s.ifbody)
                        result |= s.ifbody.blockExit(func, mustNotThrow);
                    else
                        result |= BEfallthru;
                }
                else if (s.condition.isBool(false))
                {
                    if (s.elsebody)
                        result |= s.elsebody.blockExit(func, mustNotThrow);
                    else
                        result |= BEfallthru;
                }
                else

Having it set BEfallthru as if both ifbody and elsebody could execute should
work, but I wonder about its affect on existing code.

--

Reply via email to