On Mon Dec 5 13:04:05 2022 +0000, Giovanni Mascellani wrote:
It's good to test for this failure, but we should probably also have a succeeding test for the usual case (having a static numeric variable, returning it and showing it is zero).
I wanted to avoid a nondeterministic test. If the test depends on an uninitialized value, it may succeed or fail randomly.
This one has the nicety that is constant folding that triggers the error iff the value is actually initialized to zero, otherwise, it has no way of knowing that the denominator will be zero.