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

--- Comment #14 from Rainer Schuetze <[email protected]> ---
The problem here is not the short-circuiting of semantic analysis, but the
const-folding now done on the second operand of "&&" that predicts a runtime
error if the code is actually executed.

Maybe it's ok to consider const-folding part of the semantic analysis (and the
code in the bug report never should have compiled). Otherwise we could try to
detect dead code and mute const-folding errors in it. But that's a can of worms
that's probably better left closed.

Or is it part of the language definition that you must not compile code
"arr[-1]"?

--

Reply via email to