Commit 5d6d757
authored
Currently, one may convert from a `StepRangeLen` to a `StepRange` by
using the fully parameterized constructor:
```julia
julia> r = StepRangeLen(3, 1, 4)
3:1:6
julia> StepRange{Int,Int}(r)
3:1:6
```
This PR adds a few other constructors that have fewer parameters
specified. These parameters may be derived from the argument. After this
PR, the following work:
```julia
julia> StepRange(r)
3:1:6
julia> StepRange{Int32}(r)
3:1:6
julia> StepRange{Int32}(r) |> typeof
StepRange{Int32, Int64}
```
1 parent f207224 commit 5d6d757
2 files changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
| 1332 | + | |
| 1333 | + | |
1332 | 1334 | | |
1333 | 1335 | | |
1334 | 1336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2786 | 2786 | | |
2787 | 2787 | | |
2788 | 2788 | | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
0 commit comments