SIGN IN SIGN UP

`StepRangeLen` - conversion not contruction on indexed access (#61580)

Conversion to element type `T` is implied for indexed access to
`StepRangeLen` range, from the result of arithmetic on range parameters
`(ref::R, step::S, len::L, offset::L)` and the subscript.

Previous method assumes constructor `T(r::R2)` was available for this
conversion, which made indexed access break when no such constructor was
available. (Previous discussion on an example with `Dates.Time`: #58846)

This change is to use conversion rather than construction, which is more
likely to be available, and follows the guidance in the manual
[Conversion vs.
Construction](https://docs.julialang.org/en/v1/manual/conversion-and-promotion/#Conversion-vs.-Construction)
considering that the conversion is implicit.
M
Michael Doherty committed
c98c52c037ae49c1ec9f8b99d6aebafea49b980a
Parent: 59ef345
Committed by GitHub <noreply@github.com> on 4/21/2026, 6:37:11 PM