Apparently the splitting of the intervals assumes that high > low, but this is not a valid assumption for inclusive ranges.
This example might be contrived, but scenarios like these often happen in practice. For example, if you want to generate numbers $x, y, z \geq 0$ satisfying $x + y + z \leq 0$ by generating one number at a time and sampling the other numbers from a modified range, then you'll run into this case very quickly.
With
proptest 1.2.0
, the following applicationpanics with
Excerpt from the source:
Apparently the splitting of the intervals assumes that
high > low
, but this is not a valid assumption for inclusive ranges.This example might be contrived, but scenarios like these often happen in practice. For example, if you want to generate numbers $x, y, z \geq 0$ satisfying $x + y + z \leq 0$ by generating one number at a time and sampling the other numbers from a modified range, then you'll run into this case very quickly.