Open
Description
Description
The preconditions associated with the function relative(to:)
has inconsistent checking for lower versus upper bounds.
Reproduction
print((0...5).relative(to: 0..<4)) // fatal
print((-1...3).relative(to: 0..<4)) // not fatal
Expected behavior
Both upper and lower bounds should have fatal conditions to ensure proper bounds checking.
Environment
all
Additional information
No response