Issue ID: 18560
Summary: find on infinite ranges is broken
assert(true.repeat.all != false);
We may expect this to hang indefinitely. We will certainly not expect it to
What happens is this.
true.repeat is an infinite range. all searches for a place at which its
condition becomes false. For this, it employs find. Find uses "empty" to signal
success, ie. it returns an empty range if the element was not found. However,
in this case find *cannot* return an empty range because the Repeat range type
can never be empty. It compiles anyways. This then leads to .empty concluding,
correctly, that find may never return an empty range, and immediately, without
evaluating its input range, returning false.
Either all must not be implemented on top of find, or find must be adjusted to
signal failure in some other way, possibly using a VariantN.